views:

209

answers:

1

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?

+1  A: 

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
SLaks