Range currentRange = Paragraphs[3].Range;
Table table = Tables.Add(currentRange, 8, 3, ref missing, ref missing);
Range range = table.Cell(1, 3).Range;
// Starts as "\r\a"
range.Text = "SomeText";
// The text is now "SomeText\r\a"
range.MoveEnd(WdUnits.wdCharacter, -1);
// "SomeText"
range.Bold = 1;
range.InsertParagraphAfter();
// "SomeText\r" (this puts the paragraph mark inside the current range which is kind of counter-intuitive)
range.Collapse(WdCollapseDirection.wdCollapseEnd);
// This is the new paragraph
Interop.ContentControl cc = range.ContentControls.Add();
cc.Tag = "someTag";
在摘要标记中,公司名称后有一些html标记。这些曾经只是原始文件中的字符串,但看起来像我的xml解析器将它们读取为未封闭的标签,而不仅仅是文本的一部分。
是否可以解决此问题?我仍在搜索此问题,但是大多数文章都将恢复,而不是删除...
提前致谢!