如何使用视图页
运行以下代码var inspector = Globals.ThisAddIn.Application.ActiveInspector();
var document = (Word.Document)inspector.WordEditor;
答案 0 :(得分:0)
使用项目检查器而不是ActiveInspector:
var document = item.GetInspector.WordEditor as Word.Document;
if (document != null)
{
//code here....
}