views:

49

answers:

4

Hi,

I have a word document with many content controls. How can I export the content of content control into another word document? I'm using C# and open xml sdk. Regards.

A: 

Are they bound to customxmlparts?

In straight VB, there is a ContentControls collection in the ActiveDocument. You can iterate through the collection and pull out the content that way.

I don't know if the OOXML SDK exposes the content controls in a document in an easy-to-get way.

What problem are you trying to solve?

Jonathan Yee
+1  A: 

Hi Jonathan, content controls are not bound to CustomXMLParts. I'm using Altchunck to merge multiple docx files into one document. Each docx file is inserted within a content control.The merged document is opened in a winforms application using DSOFramer. I want to update the source docx file when the content control content is modified. Regards.

Bilel Boughanmi
A: 

Thanks Otaku, it is very useful.

Bilel Boughanmi