保存文档时出现Word 2003 COMException 0x800A1066 [英] Word 2003 COMException 0x800A1066 while saving document

查看:290
本文介绍了保存文档时出现Word 2003 COMException 0x800A1066的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我写了一个单词2003 addin,我无法保存包含我设置的CustomDocumentProperties的文档.
文档以两种方式保存:
1st:截取单词的保存"按钮->一切正常,包括的属性
2st:点击Windows窗体的按钮->这是问题所在

单击按钮后,将创建一个新文档,将写入一些CustomDocumentProperties,例如ID和名称(最多20个字符),将一些文本添加到文档中,然后必须保存该文档,但这失败,并显示以下消息:

Hi,
I write a word 2003 addin and I have trouble with saving a document which contains CustomDocumentProperties set by me.
Documents are saved in 2 ways:
1st: By intercepting the word''s save button --> all OK, the properties included
2st: By clicking on a button of a windows form --> here is the problem

After the button click a new document is created, some CustomDocumentProperties are written like ID and name (max. 20 chars), some text is added to the document and then the document has to be saved but this fails with the following message:

ReportAddIn.WordProcessor: 2011-08-09 17:42:28,418 [4] ERROR saveDocument -
System.Runtime.InteropServices.COMException (0x800A1066): Befehl misslungen



无需编写自定义文档属性,一切正常.
对于Word 2010和2007,代码可以正常运行.

问题是什么?
请帮助...



Without writing the custom document properties everything works fine.
For word 2010 and 2007 the code runs fine.

What does the problem is?
Please help...

推荐答案

Office主要互操作程序集(PIA)在Office 2003与Office 2007之前及之后的版本之间不兼容.这并不意味着您无法解决您的问题.

在Google或MSDN上搜索"Word 2003 2007 PIA"或"Word 2003 2007 interop",然后开始学习如何使用它们.

问候
The Office Primary Interop Assemblies (PIA) are not compatable between office 2003 and prior to Office 2007 and later. That does not mean you can''t address your issues.

Do a search on google or at MSDN for "Word 2003 2007 PIA" or "Word 2003 2007 interop" and start learning how to work with them.

Regards


这篇关于保存文档时出现Word 2003 COMException 0x800A1066的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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