Ms word 找不到ListTemplates的get_Item()方法

Ms word 找不到ListTemplates的get_Item()方法,ms-word,vsto,Ms Word,Vsto,我正在开发一个C#/VSTO应用程序,用于自动化MS Word中的某些任务。我正在尝试使用ListTemplate更改编号列表的起始编号。我见过几个访问列表模板的示例,如下所示: ListTemplate template = app.ListGalleries[WdListGalleryType.wdNumberGallery].ListTemplates.get_Item(ref n); 但是,Visual Studio不将get_Item()识别为ListTemplates的方

我正在开发一个C#/VSTO应用程序,用于自动化MS Word中的某些任务。我正在尝试使用ListTemplate更改编号列表的起始编号。我见过几个访问列表模板的示例,如下所示:

ListTemplate template = 
    app.ListGalleries[WdListGalleryType.wdNumberGallery].ListTemplates.get_Item(ref n);

但是,Visual Studio不将get_Item()识别为ListTemplates的方法。VS弹出窗口中列出了ListTemplates的其他方法,因此我不确定问题出在哪里?如何引用ListTemplate?谢谢

当我签入VSTO时,
列表模板
没有
获取项目
。而是使用索引。比如说

ListTemplate template =app.ListGalleries[Word.WdListGalleryType.wdNumberGallery].ListTemplates[Word.WdListGalleryType.wdNumberGallery];

你需要买什么东西吗?不仅仅是索引限定符,例如ListTemplates[index]