Microsoft Office Tutorials and References
In Depth Information
Mail Merge: Displaying the Mail Merge Interface
'Remove the apostrophe from the line¶
'that you wish to have execute¶
'''Display the Mail Merge Wizard task pane¶
'Application.TaskPanes(wdTaskPanemailMerge).Visible = True¶
'''Display the mail merge toolbar¶
'Application.CommandBars("Mail merge").Visible = True¶
End If¶
End Sub¶
' * * * * *¶
Sub AutoClose()¶
Application.TaskPanes(wdTaskPanemailMerge).Visible = False¶
Application.CommandBars("Mail merge").Visible = False¶
End Sub¶
' * * * * *¶
Sub AutoOpen()¶
End Sub¶
Copy the procedure ‘DisplayMergeUserInterface’ to a module in the
template to make the functionality always available. Alternatively, you can
copy it to a module in a main merge document to restrict it to that particular
For already existing AutoOpen or Document_Open procedures, simply enter
the macro name in the procedure so that it is called. If no AutoOpen or
Document_Open procedure exists, then copy the sample AutoOpen procedure
into the same module with “InsertMergeField’. Do the same for the AutoClose
Remove the comment (apostrophe) from before the code line for the mail merge
interface to be displayed (toolbar and/or task pane).
This macro runs automatically when the file is open.
Tip: It is possible to combine linking the data source dynamically and displaying a user
interface. In this case, the AutoOpen macro could look like this:
Sub AutoOpen()¶
End Sub¶
Search JabSto ::

Custom Search