问题
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.
回答1:
Here are two great articles that will show you how to do this:
- Using LINQ to XML to Retrieve Content Controls in Word 2007
- Using Nested Content Controls for Data and Content Extraction from Open XML WordprocessingML Documents
回答2:
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.
来源:https://stackoverflow.com/questions/3610143/export-the-content-of-content-control-into-another-word-document