简体   繁体   中英

Remove Control Control from Word document after generating a document

I have a C# document generation component which inserts content into control controls in a word document and everything is working well.

The only problem is that in the generated document, the content controls are still there and you cannot select individual lines or text.

I need to remove these content controls and I thought that the content control property "Remove content control when contents are editing" is exactly what I was looking for, as my component would be changing the control content. However, it does not work.

What am I missing?

In one of the samples in http://worddocgenerator.codeplex.com content controls are removed from the document while keeping the content. The specific method is RemoveContentControlsAndKeepContents(Document document)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM