Method: Exists for DocumentProperties <DataPlugin>
- Updated2024-09-12
- 1 minute(s) read
DataPlugin > Methods > Method: Exists for DocumentProperties <DataPlugin>
Method: Exists for DocumentProperties <DataPlugin>
Checks whether a property with a specific name already exists in a document. A document can be an Office file in XML format, a PDF, JPEG, PNG, or TIFF file.
bExists = Object.Exists(sName)
| Object | DocumentProperties <DataPlugin> Object with this method |
| sName | String Specifies the name of the custom property. |
| bExists | Boolean Specifies whether the custom property with the specified name already exists (TRUE) or not (FALSE). |
The following example only transfers the properties of a specific namespace of the document into the data set properties if this document was edited by the author Meier.
Dim sNamespace, oMyNamespaceProps, oMyProp If Document.Properties.Exists("author") Then If Document.Properties("author").Value = "Meier" Then sNamespace = "http://ns.adobe.com/xap/1.0/" If Document.Namespaces.Exists(sNamespace) Then Set oMyNamespaceProps = Document.Namespaces(sNamespace).Properties For each oMyProp in oMyNamespaceProps Call Root.Properties.Add(oMyProp.Name, oMyProp.Value) Next End If End If End If