I’m creating a c# application which finds custom content areas in a word document and swaps in content.
I now have a large list of custom content areas and it would be incredibly useful if I could just get a list of them, their tags specifically, as a text based list.
I’m currently using a free piece of software called “Word 2007 Content Control Toolkit” however there is no way to copy a list of the custom content controls as text.
Is there any way to do this? Will they be somewhere in the source code of the docx?
Thanks guys.
The content controls are in the Main Document Part (or relevant header/footer part, if that’s where they appear).
You can get at them with the Open XML SDK, or, if your C# application is a Word Add-in, via the objects exposed to you in VSTO.