Automating Mail Merge with a macro

J

Joanna

I need to be able to show the "Mail Merge Recipients"
Outlook list in step 3 of the Mail Merge Wizard after the
macro has allowed the user to select from their Outlook
contacts. I am able to show the initial "Select Contact
List folder" form using the following code:
ActiveDocument.MailMerge.OpenDataSource Name:="",
SubType:=wdMergeSubTypeOutlook

How may I show the "Mail Merge Recipients" form and is
there a website I can go to for more in depth information
of Mail Merge?
 
P

Peter Jamieson

It depends on exactly what you need.

Dialogs(wdDialogMailMergeRecipients).Execute

may be enough. But if you want to control a dialog (and the amount of
control you can get varies depending on the dialog box) you may need
something more like

Dim oDialog As Dialog
Set oDialog = Dialogs(wdDialogMailMergeRecipients)
With oDialog
' do stuff - notice that each dialog may have different properties that are
not listed in the VBA autocomplete)
' e.g.
.Execute
End With
Set oDialog = Nothing
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top