Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created June 8, 2023 08:26
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/f898511d2c1cf26a5784cb5c8806aa79 to your computer and use it in GitHub Desktop.
Save bjoerntx/f898511d2c1cf26a5784cb5c8806aa79 to your computer and use it in GitHub Desktop.
TXTextControl.LoadSettings ls = new TXTextControl.LoadSettings() {
ApplicationFieldFormat = TXTextControl.ApplicationFieldFormat.MSWord,
LoadSubTextParts = true };
using (TXTextControl.ServerTextControl serverTextControl =
new TXTextControl.ServerTextControl()) {
serverTextControl.Create();
serverTextControl.Load("template.docx", TXTextControl.StreamType.WordprocessingML, ls);
using (MailMerge mailMerge = new MailMerge()) {
mailMerge.TextComponent = serverTextControl;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment