Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created April 15, 2022 14:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerntx/c7da2c4028c9f7d54258e6defefd4890 to your computer and use it in GitHub Desktop.
Save bjoerntx/c7da2c4028c9f7d54258e6defefd4890 to your computer and use it in GitHub Desktop.
TXTextControl.UserDefinedPropertyDictionary userSettings =
new TXTextControl.UserDefinedPropertyDictionary();
userSettings.Add("CustomPropertyString", "Custom property string");
userSettings.Add("CustomPropertyInt32", 123);
userSettings.Add("CustomPropertyBoolTrue", true);
userSettings.Add("CustomPropertyBoolFalse", false);
userSettings.Add("CustomPropertyDouble", 123.232);
TXTextControl.SaveSettings saveSettings = new TXTextControl.SaveSettings() {
UserDefinedDocumentProperties = userSettings
};
textControl1.Save("output.docx",
TXTextControl.StreamType.WordprocessingML,
saveSettings);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment