Invoking dialog "Merge To Email"

D

Diane

Group,
Is it possible to invoke the "Merge To Email" dialog box. I know that by
using "Dialogs(wdDialogMailMerge).Show", I get the dialog box that allows one
to merge to printer, document, or email - these are more options than needed
for the user. I want to go straight to the dialog box "Merge to Email" that
is accessed from the mail merge menu bar. Any suggestions of how to invoke
this using VBA with Office 2003?
Diane
 
D

Diane

Peter,
That worked, although it was interesting that if I invoke 1369 from code the
"Merge to Email" process activates the annoying Outlook Security warning VS
just clicking on the "Merge to Email" icon on the toolbar then I do not get
the Outlook Security.

OK - so where do I find a reference, how did you know 1369 was the
equivilant to the "Merge to Email" icon?

Many thanks for your responses!!

Diane
 
P

Peter Jamieson

OK - so where do I find a reference, how did you know 1369 was the
equivilant to the "Merge to Email" icon?

There does not appear to be a reference. I looked at the existing
manifest constants for the mail merge dialog boxes, there are some at
81, 82, a cluster around 680, a cluster around 1305 and a cluster around
4050, plus a few isolated numbers.

I then used loops like

for i = 670 to 690
dialogs(i).show
next

to see what showed up and struck lucky (actually, out of interest I
surveyed thousands of these numbers and there are a heck of a lot of
these "dialog boxes", many of which actually pop up web pages, other
apps, etc. Unfortunately, some of them will also play havoc with your
display or crash Word so it gets a bit tedious, and I may well have
skipped a few numbers even close to those clusters I mentioned)

In some cases there are apparently several numbers associated with the
same or similar dialog box. In some cases the difference is that one is
a pre-2007 version of the dialog and the other is the 2007 version. But
although there were a couple of boxes around the 680 range for the
equivalent "merge to printer" and "merge to new document" dialogs, /and/
boxes (I think in the 1300 range somewhere) for the same things, I only
found one merge to email dialog. So...
That worked, although it was interesting that if I invoke 1369 from code the
"Merge to Email" process activates the annoying Outlook Security warning VS
just clicking on the "Merge to Email" icon on the toolbar then I do not get
the Outlook Security.

...it's possible that there is another number that works better in that
respect. But I think it is actually more likely that whatever checks the
cedentials when deciding whether to pop that box makes a distinction
between user-defined VBA code and Word's own code (I've seen similar
signs of this before but never researched it). It may depend on whether
you are using the dialog box to gather information, then make the
appropriate settings and do a Mailmerge.Execute, or whether you are
allowing the dialog to start the merge (I haven't tried).


Peter Jamieson

http://tips.pjmsn.me.uk
 

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