|
在word 2007中,将选中区域设置交叉引用,写的代码如下:
Object oIndex = "1";
Object oHyperLink = true;
Object oIncludePosition = false;
Object oSepNumber = false;
Object oSepString = " ";
Object oReferenceType = Word.WdCaptionLabelID.wdCaptionFigure;
Word.Document app = Globals.ThisAddIn.Application.ActiveDocument;
Word.Selection selection = app.Application.Selection;
selection.InsertCrossReference(ref oReferenceType,Word.WdReferenceKind.wdEntireCaption,
ref Index, ref oHyperLink, ref oIncludePosition, ref oSepNumber, ref oSepString);
但是执行selection.InsertCrossReference(),会抛出"命令失败"的错误,
不清楚 错误原因,请各位大侠指点。help.....
该贴已经同步到 宝宝谈情的微博 |
|