Skip to content

Instantly share code, notes, and snippets.

@bjoerntx
Created March 4, 2024 15:09
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/4bf14a71f50da832d84b5ba445c8e8a6 to your computer and use it in GitHub Desktop.
Save bjoerntx/4bf14a71f50da832d84b5ba445c8e8a6 to your computer and use it in GitHub Desktop.
TXTextControl.LoadSettings loadSettings = new TXTextControl.LoadSettings()
{
ApplicationFieldFormat = TXTextControl.ApplicationFieldFormat.MSWordTXFormFields
};
using (TXTextControl.ServerTextControl serverTextControl =
new TXTextControl.ServerTextControl())
{
serverTextControl.Create();
serverTextControl.Load("contentcontrols.docx",
TXTextControl.StreamType.WordprocessingML, loadSettings);
foreach (FormField ff in serverTextControl.FormFields)
{
Console.WriteLine(ff.Text);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment