creating outlook addin (mail merge)

G

Gixxer_J_97

hi all,

i've relied very heavily on the macro recorder when doing excel vba, but
since there isn't one for outlook i'm kind of stuck as to where to start.

here's what i want to do:

the user selects one or more contacts from the CONTACTS in outlook
presses the addin button and the the code will take the selected contacts,
do a mail merge for envelopes using a pre-existing document, and arrive at
the print dialog box.

any help is greatly appreciated!

thanks!

J
 
E

Eric Legault [MVP - Outlook]

Is there any reason in particular why you want to automate this with code?
This functionality is actually built right in. Just select the Contacts and
choose Mail Merge from the Tools menu. The dialog you're presented with
allows you to choose whether to use a new Word document or select an existing
template, as well as choose the mail merge type (letter, envelope, etc.).
 
G

Gixxer_J_97

yup - lets just say that the end user has a bad temper when they have to
click more than two or three times 'It's to #($#J#$ complicated!' was the
answer (from my boss) when i showed him how to do it.
 
E

Eric Legault [MVP - Outlook]

What is too complicated - the mail merge wizard options? There's absolutely
no point in recreating those options with a custom application. Or is the
chore selecting the contacts and clicking Mail Merge from the Tools menu?
Selecting the contacts can't be automated obviously, but you can create a
custom menu/toolbar button and put the Mail Merge button at a "higher level".

Remember that once a mail merge document is set up, it can be saved to be
reused later with less steps. The chosen contacts can also be reused.

Maybe have your boss review the information on this page, which is geared
towards the average user:

Microsoft Office Assistance: Mail Merge:
http://office.microsoft.com/en-ca/assistance/CH011490211033.aspx

--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
Try Picture Attachments Wizard for Outlook! http://tinyurl.com/ckytm
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/
 
G

Gixxer_J_97

well, for him, selecting the contacts, selecting tools -> mail merge,
selecting 'selected contacts only', browsing for the saved template, choosing
'envelope' clicking ok is too complicated

it's not that he wants something re-created, just he wants to be able to
select the contacts, click a button and click print (and making me miserable
in the process! =) )
 
G

Gixxer_J_97

he's someone who uses excel for everything - writing letters & faxes, contact
information, writing e-mail, etc etc because the 'other programs' are too
complicated. i've just barely got him to use outlook period too.
 
M

Mike

This is very similar to what I'm looking to do as well. I've created a
custom view (this makes selecting the names a LOT easier, btw - added a
custom yes/no field and just select the field 'yes' for the names I want to
include) but would like to create a turnkey process - click on a button to
select the view, start the mail merge with specific options (eg, all
contacts in view, only fields in view, selecting a specific Word doc, etc.)
and - ideally - do a "save as..." in Word using a new document name. It
would really be great if I could add code to start up 'Express ClickYes'
(and close it when the merge is complete).

None of this is complicated, but I'm trying to convince someone to use mail
merge for group email instead of a distribution list (more personal, doesn't
put everyone's name in the 'to' field, etc.). I'm just learning VBA and I'm
stuck at the code to simply select the view I want.

Thanks in advance for any help!

Mike
 
Top