Share via


DocumentVariable.Val 属性

定义

文档变量值

表示架构中的以下属性:w:val

[DocumentFormat.OpenXml.SchemaAttr(23, "val")]
public DocumentFormat.OpenXml.StringValue Val { get; set; }
public DocumentFormat.OpenXml.StringValue Val { get; set; }
[DocumentFormat.OpenXml.SchemaAttr(23, "val")]
public DocumentFormat.OpenXml.StringValue? Val { get; set; }
[DocumentFormat.OpenXml.SchemaAttr("w:val")]
public DocumentFormat.OpenXml.StringValue? Val { get; set; }
public DocumentFormat.OpenXml.StringValue? Val { get; set; }
member this.Val : DocumentFormat.OpenXml.StringValue with get, set
[<DocumentFormat.OpenXml.SchemaAttr(23, "val")>]
member this.Val : DocumentFormat.OpenXml.StringValue with get, set
[<DocumentFormat.OpenXml.SchemaAttr("w:val")>]
member this.Val : DocumentFormat.OpenXml.StringValue with get, set
Public Property Val As StringValue

属性值

返回 StringValue

属性

注解

使用此类时,ECMA 国际标准 ECMA-376 中的以下信息可能很有用。

指定父文档变量的值。

请考虑以下指定文档变量的 WordprocessingML 片段:

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

属性 val 指定文档变量 Samantha Smith的值为 。

此属性的可能值由 ST_String 简单类型定义。

适用于