如何获得客户列表模板? [英] how to get customer list template ?

查看:130
本文介绍了如何获得客户列表模板?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

到目前为止,我已经写了一个"template.dotx"。其中包含多级列表模板的文件。

so far i've written a "template.dotx" file which contains a multi-level list template in it.

我想使用此列表模板,所以我写下面的代码:

and i wanna use this list template, so i write the code below :

string exePath = System.Windows.Forms.Application.StartupPath + "\\";
            Word._Application wordApp = new Word.Application();
            Word._Document templateDoc = wordApp.Documents.Open(exePath + "template.dotx");
            templateDoc.Activate();


            Word.ListTemplate lt = wordApp.ListGalleries[Word.WdListGalleryType.wdOutlineNumberGallery].ListTemplates[7];

但似乎wordApp对象找不到我的列表模板,用于  " wordApp.ListGalleries [Word.WdListGalleryType.wdOutlineNumberGallery] .ListTemplates"只有7个默认模板?

but it seems the wordApp object doesnt find my list template, for  "wordApp.ListGalleries[Word.WdListGalleryType.wdOutlineNumberGallery].ListTemplates" only have 7 default template?

但如果我用office2013打开dotx,它包含我创建的列表模板。

but if i open the dotx with office2013, it contains the list template i've created.

无论如何我可以获得模板吗?

is there anyway i can obtain the template?

推荐答案

在我的Word 2013中测试后,我发现
Count 属性 ListGalleries(wdOutlineNumberGallery).ListTemplates 总是返回7,即使我将3个新的多级列表模板添加到列表库中。并且
ListTemplates 集合中每个列表模板的项目编号都未修复。因此,我们很难知道我们需要的List模板的项目编号,并且使用7可能无法获得正确的结果。

After testing in my Word 2013, I find that Count property of ListGalleries(wdOutlineNumberGallery).ListTemplates always returns 7 even though I add 3 new multilevel List templates into List Library. And the item number of every List template in ListTemplates collection is not fixed. So it's hard for us to know the item No. of the List template which we need and using 7 may be not able to get the correct result.

我试图让某人参与其中熟悉这个主题以进一步研究这个问题。可能会有一些时间延迟。感谢您的耐心。

I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.

很抱歉给您带来不便,祝您有个愉快的一天!

Sorry for any inconvenience and have a nice day!


这篇关于如何获得客户列表模板?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆