【发布时间】:2017-04-06 16:18:12
【问题描述】:
假设我有以下结构:-
我想得到“1.3段落3的标题”之后的第二个表的索引,意思是下一个:-
输入是
1.3 第3段的标题
预期输出
4
这是文档中的第四个表格,或者你可以说
The requested member of the collection等于四。
this 使用下一个代码的目标
Microsoft.Office.Interop.Word.Application app = new Microsoft.Office.Interop.Word.Application();
Documents docs = app.Documents;
Document doc = docs.Open(sDocPath, ReadOnly: true);
Table t = doc.Tables[4] // 4 that what I need
【问题讨论】:
标签: c# .net office-interop office-2007