问题描述
我写了一个单词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...
推荐答案
这篇关于保存文档时出现Word 2003 COMException 0x800A1066的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!