自动化 [英] Word automation

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

问题描述

大家好,

有人可以解释

推荐答案


有人能解释一下差异

Can someone explaine the difference between

前两个 - CreateObject和New Word.Application - 都创建Word应用程序对象的新实例并将其分配给appWord。 最后一个,GetObject,找到一个现有的Word实例 - 即
已经打开的Word应用程序对象 - 并将其分配给appWord。

The first two -- CreateObject and New Word.Application -- both create a new instance of the Word application object and assign that to appWord.  The last one, GetObject, locates an existing instance of Word -- that is, a Word application object that is already open -- and assigns that to appWord.

差异在前两个之间是CreateObject不要求你有对Word对象库的引用,而"Set appWord = New Word.Application"确实需要引用Word以便"Word.Application"
有待理解。

The difference between the first two is that CreateObject doesn't require you to have a reference to the Word object library, while "Set appWord = New Word.Application" does require a reference to Word in order for "Word.Application" to be understood.


这篇关于自动化的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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