TX Text Control .NET Server

UserDefinedDocumentProperties Property

Property|Introduced in 24.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.dll

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; }

Examples

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);

Further Reading

  • Maintaining Custom Document Properties –
  • Using Custom Document Properties to Store Additional Document Information –