DocumentVariable.Val Property

Document Variable Value.Represents the attribte in schema: w:val

Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
<SchemaAttrAttribute(, "val")> _
Public Property Val As StringValue
    Get
    Set
'Usage
Dim instance As DocumentVariable
Dim value As StringValue

value = instance.Val

instance.Val = value
[SchemaAttrAttribute(, "val")]
public StringValue Val { get; set; }

Property Value

Type: DocumentFormat.OpenXml.StringValue
Returns StringValue.

Remarks

The following information from the ECMA International Standard ECMA-376 can be useful when working with this class.

Specifies the value of the parent document variable.

Consider the following WordprocessingML fragment specifying a document variable:

<w:docVars>
  <w:docVar w:name="example name" w:val="Samantha Smith" />
</w:docVars>

The val attribute specifies that the value of the document variable is Samantha Smith.

The possible values for this attribute are defined by the ST_String simple type.

See Also

Reference

DocumentVariable Class

DocumentVariable Members

DocumentFormat.OpenXml.Wordprocessing Namespace