0
我想使用Microsoft.Interop.Word以编程方式打开Word文档,并将注释插入表格单元格。 我有单元格范围的开始和结束位置。 (Range.Start \ Range.End)Microsoft Interops Word插入注释到表格单元格崩溃Word
Application.ActiveDocument.Select(); // select ative document
Range rg = Application.Selection.Range; // get the range of the current selection (all document)
if (rg.Tables.Count > 0)
{
Microsoft.Office.Interop.Word.Range rngTab = rg;
//set the coordinate of the Range of the text
rngTab.Start = startRng;
rngTab.End = endRng;
doc.ActiveWindow.Visible = true;
rg.Select();
Application.ActiveDocument.Comments.Add(rngTab, ref commentText);
}
当插入注释Word崩溃
Word崩溃?没有错误信息? Word是否正确安装? Word的最佳版本?请添加您的问题的答案! –
Microsoft Word 2013,Word安装正确且没有错误信息,没有例外,只是崩溃“Microsoft Word已停止工作”,然后重新启动Microsoft Word。如果我在平面文本中插入评论,它效果很好 –
Interops版本14.0.0.0 –