Поделиться через


CustomDocumentProperty Class

Custom File Property.When the object is serialized out as xml, its qualified name is op:property.

Inheritance Hierarchy

System.Object
  DocumentFormat.OpenXml.OpenXmlElement
    DocumentFormat.OpenXml.OpenXmlCompositeElement
      DocumentFormat.OpenXml.CustomProperties.CustomDocumentProperty

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

Syntax

'Declaration
<ChildElementInfoAttribute(GetType(VTVector))> _
<ChildElementInfoAttribute(GetType(VTArray))> _
<ChildElementInfoAttribute(GetType(VTBlob))> _
<ChildElementInfoAttribute(GetType(VTOBlob))> _
<ChildElementInfoAttribute(GetType(VTEmpty))> _
<ChildElementInfoAttribute(GetType(VTNull))> _
<ChildElementInfoAttribute(GetType(VTByte))> _
<ChildElementInfoAttribute(GetType(VTShort))> _
<ChildElementInfoAttribute(GetType(VTInt32))> _
<ChildElementInfoAttribute(GetType(VTInt64))> _
<ChildElementInfoAttribute(GetType(VTInteger))> _
<ChildElementInfoAttribute(GetType(VTUnsignedByte))> _
<ChildElementInfoAttribute(GetType(VTUnsignedShort))> _
<ChildElementInfoAttribute(GetType(VTUnsignedInt32))> _
<ChildElementInfoAttribute(GetType(VTUnsignedInt64))> _
<ChildElementInfoAttribute(GetType(VTUnsignedInteger))> _
<ChildElementInfoAttribute(GetType(VTFloat))> _
<ChildElementInfoAttribute(GetType(VTDouble))> _
<ChildElementInfoAttribute(GetType(VTDecimal))> _
<ChildElementInfoAttribute(GetType(VTLPSTR))> _
<ChildElementInfoAttribute(GetType(VTLPWSTR))> _
<ChildElementInfoAttribute(GetType(VTBString))> _
<ChildElementInfoAttribute(GetType(VTDate))> _
<ChildElementInfoAttribute(GetType(VTFileTime))> _
<ChildElementInfoAttribute(GetType(VTBool))> _
<ChildElementInfoAttribute(GetType(VTCurrency))> _
<ChildElementInfoAttribute(GetType(VTError))> _
<ChildElementInfoAttribute(GetType(VTStreamData))> _
<ChildElementInfoAttribute(GetType(VTOStreamData))> _
<ChildElementInfoAttribute(GetType(VTStorage))> _
<ChildElementInfoAttribute(GetType(VTOStorage))> _
<ChildElementInfoAttribute(GetType(VTVStreamData))> _
<ChildElementInfoAttribute(GetType(VTClassId))> _
<ChildElementInfoAttribute(GetType(VTClipboardData))> _
Public Class CustomDocumentProperty _
    Inherits OpenXmlCompositeElement
'Usage
Dim instance As CustomDocumentProperty
[ChildElementInfoAttribute(typeof(VTVector))]
[ChildElementInfoAttribute(typeof(VTArray))]
[ChildElementInfoAttribute(typeof(VTBlob))]
[ChildElementInfoAttribute(typeof(VTOBlob))]
[ChildElementInfoAttribute(typeof(VTEmpty))]
[ChildElementInfoAttribute(typeof(VTNull))]
[ChildElementInfoAttribute(typeof(VTByte))]
[ChildElementInfoAttribute(typeof(VTShort))]
[ChildElementInfoAttribute(typeof(VTInt32))]
[ChildElementInfoAttribute(typeof(VTInt64))]
[ChildElementInfoAttribute(typeof(VTInteger))]
[ChildElementInfoAttribute(typeof(VTUnsignedByte))]
[ChildElementInfoAttribute(typeof(VTUnsignedShort))]
[ChildElementInfoAttribute(typeof(VTUnsignedInt32))]
[ChildElementInfoAttribute(typeof(VTUnsignedInt64))]
[ChildElementInfoAttribute(typeof(VTUnsignedInteger))]
[ChildElementInfoAttribute(typeof(VTFloat))]
[ChildElementInfoAttribute(typeof(VTDouble))]
[ChildElementInfoAttribute(typeof(VTDecimal))]
[ChildElementInfoAttribute(typeof(VTLPSTR))]
[ChildElementInfoAttribute(typeof(VTLPWSTR))]
[ChildElementInfoAttribute(typeof(VTBString))]
[ChildElementInfoAttribute(typeof(VTDate))]
[ChildElementInfoAttribute(typeof(VTFileTime))]
[ChildElementInfoAttribute(typeof(VTBool))]
[ChildElementInfoAttribute(typeof(VTCurrency))]
[ChildElementInfoAttribute(typeof(VTError))]
[ChildElementInfoAttribute(typeof(VTStreamData))]
[ChildElementInfoAttribute(typeof(VTOStreamData))]
[ChildElementInfoAttribute(typeof(VTStorage))]
[ChildElementInfoAttribute(typeof(VTOStorage))]
[ChildElementInfoAttribute(typeof(VTVStreamData))]
[ChildElementInfoAttribute(typeof(VTClassId))]
[ChildElementInfoAttribute(typeof(VTClipboardData))]
public class CustomDocumentProperty : OpenXmlCompositeElement

Remarks

The following table lists the possible child types:

  • DocumentFormat.OpenXml.VariantTypes.VTVector <vt:vector>

  • DocumentFormat.OpenXml.VariantTypes.VTArray <vt:array>

  • DocumentFormat.OpenXml.VariantTypes.VTBlob <vt:blob>

  • DocumentFormat.OpenXml.VariantTypes.VTOBlob <vt:oblob>

  • DocumentFormat.OpenXml.VariantTypes.VTEmpty <vt:empty>

  • DocumentFormat.OpenXml.VariantTypes.VTNull <vt:null>

  • DocumentFormat.OpenXml.VariantTypes.VTByte <vt:i1>

  • DocumentFormat.OpenXml.VariantTypes.VTShort <vt:i2>

  • DocumentFormat.OpenXml.VariantTypes.VTInt32 <vt:i4>

  • DocumentFormat.OpenXml.VariantTypes.VTInt64 <vt:i8>

  • DocumentFormat.OpenXml.VariantTypes.VTInteger <vt:int>

  • DocumentFormat.OpenXml.VariantTypes.VTUnsignedByte <vt:ui1>

  • DocumentFormat.OpenXml.VariantTypes.VTUnsignedShort <vt:ui2>

  • DocumentFormat.OpenXml.VariantTypes.VTUnsignedInt32 <vt:ui4>

  • DocumentFormat.OpenXml.VariantTypes.VTUnsignedInt64 <vt:ui8>

  • DocumentFormat.OpenXml.VariantTypes.VTUnsignedInteger <vt:uint>

  • DocumentFormat.OpenXml.VariantTypes.VTFloat <vt:r4>

  • DocumentFormat.OpenXml.VariantTypes.VTDouble <vt:r8>

  • DocumentFormat.OpenXml.VariantTypes.VTDecimal <vt:decimal>

  • DocumentFormat.OpenXml.VariantTypes.VTLPSTR <vt:lpstr>

  • DocumentFormat.OpenXml.VariantTypes.VTLPWSTR <vt:lpwstr>

  • DocumentFormat.OpenXml.VariantTypes.VTBString <vt:bstr>

  • DocumentFormat.OpenXml.VariantTypes.VTDate <vt:date>

  • DocumentFormat.OpenXml.VariantTypes.VTFileTime <vt:filetime>

  • DocumentFormat.OpenXml.VariantTypes.VTBool <vt:bool>

  • DocumentFormat.OpenXml.VariantTypes.VTCurrency <vt:cy>

  • DocumentFormat.OpenXml.VariantTypes.VTError <vt:error>

  • DocumentFormat.OpenXml.VariantTypes.VTStreamData <vt:stream>

  • DocumentFormat.OpenXml.VariantTypes.VTOStreamData <vt:ostream>

  • DocumentFormat.OpenXml.VariantTypes.VTStorage <vt:storage>

  • DocumentFormat.OpenXml.VariantTypes.VTOStorage <vt:ostorage>

  • DocumentFormat.OpenXml.VariantTypes.VTVStreamData <vt:vstream>

  • DocumentFormat.OpenXml.VariantTypes.VTClassId <vt:clsid>

  • DocumentFormat.OpenXml.VariantTypes.VTClipboardData <vt:cf>

[ISO/IEC 29500-1 1st Edition]

22.3.2.2 property (Custom File Property)

This element specifies a single custom file property. Custom file property type is defined through child elements in the File Properties Variant Type namespace. Custom file property value can be set by setting the appropriate Variant Type child element value.

Parent Elements

Properties (§22.3.2.1)

Child Elements

Subclause

array (Array)

§22.4.2.1

blob (Binary Blob)

§22.4.2.2

bool (Boolean)

§22.4.2.3

bstr (Basic String)

§22.4.2.4

clsid (Class ID)

§22.4.2.5

cy (Currency)

§22.4.2.6

date (Date and Time)

§22.4.2.7

decimal (Decimal)

§22.4.2.8

empty (Empty)

§22.4.2.9

error (Error Status Code)

§22.4.2.10

filetime (File Time)

§22.4.2.11

i1 (1-Byte Signed Integer)

§22.4.2.12

i2 (2-Byte Signed Integer)

§22.4.2.13

i4 (4-Byte Signed Integer)

§22.4.2.14

i8 (8-Byte Signed Integer)

§22.4.2.15

int (Integer)

§22.4.2.16

lpstr (LPSTR)

§22.4.2.17

lpwstr (LPWSTR)

§22.4.2.18

null (Null)

§22.4.2.19

oblob (Binary Blob Object)

§22.4.2.20

ostorage (Binary Storage Object)

§22.4.2.21

ostream (Binary Stream Object)

§22.4.2.22

r4 (4-Byte Real Number)

§22.4.2.23

r8 (8-Byte Real Number)

§22.4.2.24

storage (Binary Storage)

§22.4.2.25

stream (Binary Stream)

§22.4.2.26

ui1 (1-Byte Unsigned Integer)

§22.4.2.27

ui2 (2-Byte Unsigned Integer)

§22.4.2.28

ui4 (4-Byte Unsigned Integer)

§22.4.2.29

ui8 (8-Byte Unsigned Integer)

§22.4.2.30

uint (Unsigned Integer)

§22.4.2.31

vector (Vector)

§22.4.2.33

vstream (Binary Versioned Stream)

§22.4.2.34

Attributes

Description

fmtid (Format ID)

Uniquely relates a custom property with an OLE property.

The value of this attribute is a Globally Unique Identifier in the form of {HHHHHHHH-HHHH-HHHH-HHHH-HHHHHHHH} where each H is a hexidecimal.

The possible values for this attribute are defined by the ST_Guid simple type (§22.9.2.4).

linkTarget (Bookmark Link Target)

Specifies the name of a bookmark in the current document (for WordprocessingML), or a table or named cell (for SpreadsheetML) from which the value of this custom document property should be extracted.

If this attribute is present, then any value under this element shall be considered a cache and replaced with the value of this bookmark (if present) on save. If the bookmark is not present, then this link shall be considered broken and the cached value shall be retained.

The possible values for this attribute are defined by the W3C XML Schema string datatype.

name (Custom File Property Name)

Specifies the name of this custom file property.

The possible values for this attribute are defined by the W3C XML Schema string datatype.

pid (Property ID)

Uniquely relates a custom property with an OLE property.

The possible values for this attribute are defined by the W3C XML Schema int datatype.

[Note: The W3C XML Schema definition of this element’s content model (CT_Property) is located in §A.6.3. end note]

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

CustomDocumentProperty Members

DocumentFormat.OpenXml.CustomProperties Namespace