Hi
I have a Word 2007 .docx file which has a number of content controls.
I am looping around each of the controls, and when I hit a specific control instead of inserting text, I want to insert HTML code. The content control is the content of a publication (the other controls are dates, keywords, etc) and the HTML incudes formatting, tables, info, etc.
Is there a way I can take the HTML and put it in to the text please?
The code is below
private void RefreshContentControls(Document doc)
{
xmlPart = doc.CustomXMLParts.Add(this.metaData, missing);
foreach (ContentControl ctrl in doc.ContentControls)
{
ctrl.XMLMapping.SetMapping("/root.bookmark[@name='" + ctrl.Tag + "']", "", xmlPart);
ctrl.SetPlaceholderText(null, null, string.Empty);
//So want to add....
//if (ctrl.Tag.Equals('Content'))
//{
// ctrl.XMLMapping.SetMapping("/root.bookmark[@name='" + ctrl.Tag + "']", "", xmlPart but as HTML);
//}
}
}<br/><br/><br/><br/><br/>Thanks<br/>