UserDefinedDocumentProperties Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WinForms. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Sets a dictionary with all user-defined document properties which will be saved in the document. The property's value must be an object of the type UserDefinedPropertyDictionary.
Syntax
public UserDefinedPropertyDictionary UserDefinedDocumentProperties { get; set; }Public Property UserDefinedDocumentProperties As UserDefinedPropertyDictionaryExamples
The following example attaches review metadata as user-defined document properties.
UserDefinedPropertyDictionary properties = new();
properties.Add("ReviewStatus", "Approved");
properties.Add("Department", "Finance");
SaveSettings saveSettings = new();
saveSettings.UserDefinedDocumentProperties = properties;
textControl.Save("approved-report.docx", StreamType.WordprocessingML, saveSettings);Dim properties As New UserDefinedPropertyDictionary()
properties.Add("ReviewStatus", "Approved")
properties.Add("Department", "Finance")
Dim saveSettings As New SaveSettings()
saveSettings.UserDefinedDocumentProperties = properties
textControl.Save("approved-report.docx", StreamType.WordprocessingML, saveSettings)