Word for Mac 2011 VBA 对象模型中存在空白的解决方法? [英] Workarounds for gaps in Word for Mac 2011 VBA object model?

查看:22
本文介绍了Word for Mac 2011 VBA 对象模型中存在空白的解决方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Word 2007/2010 VBA 对象模型中似乎有很多东西在 Word 2011 VBA 中完全没有.

There seem to be a bunch of things in the Word 2007/2010 VBA object model which are simply missing in Word 2011 VBA.

具体来说,Word 2007(适用于 Windows)包括与以下相关的对象和方法:

Specifically, Word 2007 (for Windows) includes objects and methods related to:

  • 内容控件
  • CustomXMLParts
  • OpenXML

例如:

**Word.Document**

Property ContentControls As ContentControls
contentcontrol events eg Event ContentControlAfterAdd(NewContentControl As ContentControl, InUndoRedo As Boolean)

Property CustomXMLParts As CustomXMLParts

Property WordOpenXML As String

**Word.ContentControl**

Property XMLMapping As XMLMapping

**Word.ContentControls**

Function Add([Type As WdContentControlType = wdContentControlRichText], [Range]) As ContentControl

**Word.Selection/Word.Range**

Sub InsertXML(XML As String, [Transform])

在 Word 2011 的 VBA 编辑器中,我找不到任何这些.

In the VBA editor in Word 2011, I can't find any of these.

Word 2011 VBA 和 Word 2010 VBA 对象模型之间的差异是否记录在任何地方?

Are the differences between Word 2011 VBA and Word 2010 VBA object models documented anywhere?

我还浏览/搜索了脚本编辑器的字典,以查看是否有任何这些对象在那里公开.他们不是.

I've also browsed/searched the Script Editor's dictionary, to see whether any of these objects are exposed there. They aren't.

到目前为止,在我的实验中,Word 2011 确实在 docx 中保留了现有的内容控件(即它保存了它们),但是您在 UI 的文档表面上看不到它们,并且似乎没有任何添加新的方式(通过开发人员"选项卡,或者通过 VBA 或 AppleScript).

In my experiments so far, Word 2011 does preserve existing content controls in a docx (ie it saves them), but you can't see them on the document surface in the UI, and there doesn't seem to be any way to add new ones (either via the Developer tab, or via VBA or AppleScript).

那么,关于如何处理 Word for Mac 2011 VBA 对象模型中的空白,特别是如何在 Mac 上的 Word 中处理内容控件和自定义 xml,有什么建议吗?

So, any suggestions as to how to work with around gaps in the Word for Mac 2011 VBA object model generally, and in particular how to work with content controls and custom xml in Word on the Mac?

推荐答案

很遗憾,VBA 中的 CC 工作似乎已从 Mac Word 2011 VBA 中删除.请参阅此页面:

Unfortunately it appears that CC work in VBA has been removed from Mac Word 2011 VBA. See this page:

Microsoft Word 2010 的对象模型更改

Mac Word 2011 VBA 的完整在线帮助位于:http://mac2.microsoft.com/vb/1033/default.aspx?src=wd

The full online help for Mac Word 2011 VBA is at: http://mac2.microsoft.com/vb/1033/default.aspx?src=wd

这篇关于Word for Mac 2011 VBA 对象模型中存在空白的解决方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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