Introduced in build 8.4
Description
Sets the value of the specified property.
C#
vb.net
Parameters
property
A DocumentProperties.BuiltInProperty object that represents the built-in property to set.propertyValue
AnObject
that represents the value of the property specified.
Exceptions
ArgumentException
SetDocumentProperty
will throw this exception if an invalid type is passed for the property.
- CreationDate, EditTime and LastPrintedDate must be of type
System.DateTime
. - RevisionNumber must be of type
int
. - ScaleOrCrop and LinksUpToDate must be of type
Boolean
.
Remarks
This feature is available in OOXML files (DOCX/DOCM) only.
Setting the value to null will clear any existing values.
This is the MS Word equivalent of File menu > Info > Show All Properties:
![](/download/thumbnails/360912/DocumentProperties.png?version=1&modificationDate=1357755460763&api=v2)
![](/download/thumbnails/360912/DocumentPropertiesPanelSelection.png?version=1&modificationDate=1357755591467&api=v2)
![](/download/thumbnails/360912/DocumentPropertiesPanel.png?version=1&modificationDate=1357755599030&api=v2)
Examples
C#
vb.net