开发者

Using VBA how to automatically run a Microsoft Word macro after a merge

开发者 https://www.devze.com 2022-12-13 20:08 出处:网络
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 f开发者_开发技巧ormat in Office 2003.

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 f开发者_开发技巧ormat 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?


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
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号