Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Last active May 5, 2022 14:24
Show Gist options
  • Save bjoerntx/c1a48fa315240b1721eaf6a6494b3c78 to your computer and use it in GitHub Desktop.
Save bjoerntx/c1a48fa315240b1721eaf6a6494b3c78 to your computer and use it in GitHub Desktop.
TXTextControl.LoadSettings ls = new TXTextControl.LoadSettings() {
ApplicationFieldFormat = TXTextControl.ApplicationFieldFormat.MSWord };
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