View Single Post
  #18   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Can you send a mail merge to a large group WITH an attachment?

The method in the article Mail merge to email with attachments at:

http://word.mvps.org/FAQs/MailMerge/...ttachments.htm

will work with any data source.

BTW, Alexandros omitted to say that first you have to turn on the computer
and start Word. G, D & R
--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"sgacek" wrote in message
...
Hello Alexandros.
Do you think these instructions would work with an Access database rather
than Excel? We have one set up and need to attach 3 docs to the main
email.
I am willing to give it a go if you think it will work.

"alexandros.papadopoulos" wrote:

DLS, I can feel your pain as I just spent a couple of hours reading a
two-paragraph HOWTO and feeling stupid. I believe it could be written in
simpler words, along these lines:

1. Start with a fresh Word document. Go to Tools - Macro - Visual Basic
Editor

2. In the Visual Basic Editor window, go to Tools - References and make
sure that an item called "Microsoft Outlook 11.0 Object Library" is
selected
(ticked). Click OK and leave the VBE window open.

3. (optional) Install ExpressClickYes from
http://www.contextmagic.com/express-clickyes/ if you have a lot of emails
to
send and can't afford to wait 5'' and click "Yes" once for every single
email
that will be sent.

4. Create a new Excel spreadsheet.
+ On the first column use "email" as the column header and enter all
email addresses you wish to send messages to.
+ On the second column use "file" as the column header and enter the
full path to the file that should be sent to the particular address. The
full
path should be of the form "C:\Documents and Settings\myusername\My
Documents\report.doc" or "http://full.path.org/filename.xls"
+ Save the file as "Directory Source.xls" and close it.

5. Start a new Word document. Start the mail merge wizard. (I assume you
know how to do plain mail merge - if not, please look for help in simpler
articles and once you've mastered plain mail merge - without
attachments -
come back to this one).
+ For document type choose "Directory".
+ In the "recipients list" step, select the Excel file you just
created,
"Directory Source.xls" as your data source.
+ Create a 2x1 table in the Word document (basically a single row
split
in half).
+ Insert the merge field "email" in the first (left) cell of the
table.
+ Insert the merge field "file" in the second (right) cell of the
table.
+ Complete the mail merge wizard by selecting to merge "To new
document..." and confirming you want all records to be merged.

6. The result is a new Word document, which has a table with all of the
information you entered in the Excel spreadsheet "Directory Source.xls".
+ Save this file as Directory.doc and close it.

7. Open your Word document that you have setup for mail merge. This
should
have all merge fields that you want, a proper connection to a data source
(usually an Excel spreadsheet or a SQL database), the text that ties it
all
together, etc. This is a working mail merge document, to which we will
append
the attachments functionality.
+ Start the mail merge wizard, selecting Document Type: "Letters"
+ For recipients list, use whatever data source you had setup before
worrying about attachments. This data source should have all information
necessary to fill in the merge fields of your Word file, but no
attachment
information.
+ At the final step of the Wizard choose "Edit Individual Letters".
This
will create a NEW document (yes, another one!) with all of your merged
messages one after the other.

8. With this document active (open & in the foreground), copy the Visual
Basic code from Doug's page
(http://word.mvps.org/faqs/mailmerge/...ttachments.htm) into a new
macro in the Visual Basic Editor you had open from step 1. Make sure that
Doug's code is the only thing in that window, no other comments,
functions or
anything are required.

9. Save the macro and then run it through the Word menu Tools - Macro -
Macros

10. If you've done everything right, you should get a pop-up asking you
for
a filename. Point it to the Word document you created and called
"Directory.doc" (the one with the big table of emails and file paths)

11. Activate ExpressClickYes of you want it to automatically approve all
outgoing emails.

12. You get another popup for the subject. Just type the subject your
emails
should have.

13. Enjoy!

I've used this with Office 2003 and it works very well. Only limitation I
see is that emails get sent in plain text format, but I'm sure there is a
way
around this. If someone knows how, I'd love to hear.

Hope this helps some people get less stuck...

-A