以下是VBA的代码
myHeadings = _ ActiveDocument.GetCrossReferenceItems("附图") For i = 1 To UBound(myHeadings) MsgBox myHeadings(i) Next i
求C#下的代码
Array myHeadings = (Array)oDoc.GetCrossReferenceItems(ref referenceType); for (int i = 1; i <= myHeadings.Length; i++) { MessageBox.Show(myHeadings.GetValue(i).ToString()); }