使用 VBA 如何在合并后自动运行 Microsoft Word 宏

发布于 2024-08-13 09:35:10 字数 179 浏览 2 评论 0原文

合并 Microsoft Word 文档后,我需要做什么才能运行宏?

我们在 Office 2003 中使用 XML 或 Word ML 格式。

合并不是在 MS Word 应用程序内部发生,而是由另一个名为 SIMS by Capita 的应用程序进行合并。

当预览文档时,如何在合并后运行宏?

What do I need to do to get a macro to run after a Microsoft Word document has been merged?

We are using the XML or Word ML format in Office 2003.

The Merge is not happening inside of the MS Word Application, it is being merge by another application called SIMS by Capita.

How can I get the Macro to run after a merge, when the document is being previewed?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

羅雙樹 2024-08-20 09:35:10

请参阅此页面

例如:

WithEvents WordApp As Application
Private Sub Document_Open()
    Set WordApp = Application
End Sub

Private Sub WordApp_MailMergeAfterMerge(ByVal Doc As Document, ByVal DocResult As Document)
    'Do things
End Sub

See this page.

For example:

WithEvents WordApp As Application
Private Sub Document_Open()
    Set WordApp = Application
End Sub

Private Sub WordApp_MailMergeAfterMerge(ByVal Doc As Document, ByVal DocResult As Document)
    'Do things
End Sub
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文