VBA for word:为什么无法访问其他打开的文档?
无论我打开多少个word文档,下面的代码总是给我1。
Sub TestMe()
MsgBox Application.Documents.Count
End Sub
有人可以教育我为什么吗?那么如何访问所有其他word文档呢?
谢谢。
the following code always give me 1 no matter how many word documents I opened.
Sub TestMe()
MsgBox Application.Documents.Count
End Sub
Could some one educate me why? and then how to access all other word documents?
thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能在单独的应用程序实例中(在 WinWord.exe 的单独会话中)打开了每个文档。
您是否在 Word 的 Windows 菜单中看到了这些文档? (或者,在 2007 年以后,切换文档菜单)
You probably opened each document in a separate application instance (in a separate session of WinWord.exe)
Do you see the documents in Word's Windows menu? (Or, in 2007+, the Switch Documents menu)