VB 2008和Microsoft Word 2010 [英] VB 2008 and Microsoft Word 2010

查看:81
本文介绍了VB 2008和Microsoft Word 2010的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们为Word 2010文档提供了版本控制系统.该系统是用VB 6编写的,并用于Word 2003文档.当修订级别更改时,我们对文档使用不同的保护.升级到Word 2010后,该系统无法正常工作.例如,当将保护类型从wdAllowOnlyRevisions更改为wdAllowOnlyFormFields时,应用程序将取消保护文档,然后使用新的保护类型来保护文档.但是,在取消保护文档之后和调用保护方法之前,在文档的查看"->限制编辑"面板中,仍选中仅允许在文档中进行这种类型的"复选框.结果,该文档未得到我们想要通过代码保护的内容,而是复选框中设置的内容.我们可以使用任何VBA/Word功能来以编程方式清除限制编辑"面板中的复选框吗?非常感谢!

We have a revision control system for word 2010 documents. The system was written with VB 6 and used for Word 2003 documents. When revision level changed we use a different protection to the document. After upgraded to Word 2010, this system failed to work. For example, when change protection type from wdAllowOnlyRevisions to wdAllowOnlyFormFields, the application unprotects the document and then protect the document with new protection type. However, after unprotect the document and before call protect method, in Review->Restrict Editing panel of the document, the "Allow only this type of editing in the document:" checkbox is still checked. As the result, the document is not protected as we want through the code, but what set in the checkbox. Are there any VBA/Word functions we can use to programmatically clear that checkbox in the Restrict Editing panel? Many thanks!

推荐答案

首先,您正在告诉我们很多我们无法理解的事情.这是您的版本控制系统.尽管您对此非常熟悉,但我们不是.例如,仅允许在文档中进行这种类型的"复选框是什么?

答案如下:(恐怕我无法给出解决方案,但有答案)

Word文件格式从doc大幅更改为docx.例如,*.doc文件是一系列类似于RTF的标记.但是* .docx文件是一个扩展名为* .docx的zip文件.我要说的是它们的格式完全不同.

因此,如果您的系统是为doc构建的,而现在您要使用docx来处理docx,则完全无法.您还必须为docx重新实现它.
First of all, you are telling us so many things we cannot comprehend. It''s your revision control system. Though you are very familiar with it, we are NOT. What the heck is "Allow only this type of editing in the document:" checkbox for example?

Here''s the answer: (I''m afraid I can''t give a solution, but an answer)

Word file format changed drastically from doc to docx. for example, a *.doc file is a series of markup similar to RTF. But a *.docx file is a zip file which has the extension *.docx. What I''m trying to say is they are completely different in format.

So if your system was built for doc and now you want to handle docx with it, you simply can''t. You will have to re-implement it for docx as well.


这篇关于VB 2008和Microsoft Word 2010的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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