简体   繁体   English

如何在不解析附件模板的情况下打开Word文档?

[英]How to open a word document without resolving the attached template?

Due to a Migration from Office 2000 to Office 2010 my word templates names has changed (from *.dot to *.dotm). 由于从Office 2000到Office 2010的迁移,我的单词模板名称已更改(从* .dot更改为* .dotm)。 Now I want to update the declaration of attached templates specified in existing documents. 现在,我想更新现有文档中指定的附加模板的声明。 I wrote a little procedure for mapping "old" and "new" template names, but run into trouble with retrieving the old template name. 我写了一些映射“旧”和“新”模板名称的过程,但是在检索旧模板名称时遇到了麻烦。 When opening the documents with Documents.open() , the specified attached template couldn't be found, so Normal.dotm is applied as default and my mapping doesn't work. 当使用Documents.open()打开文档时,找不到指定的附加模板,因此将Normal.dotm作为默认应用,并且我的映射不起作用。 I didn't find a way to shut down the automatic resolving of attached templates. 我没有找到关闭附加模板自动解析的方法。 Strange behavior: after opening the document the original template name can be seen at the documents properties but ?ActiveDocument.AttachedTemplate is 'Normal.dotm' 奇怪的行为:打开文档后,原始模板名称可以在文档属性中看到,但?ActiveDocument.AttachedTemplate是'Normal.dotm'

尝试这个:

MsgBox Dialogs(wdDialogDocumentStatistics).Template

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM