Help!

Add attachment to e-mail Mail merge

 
  

Goto page 1, 2, 3
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Mail RSS
Next:  Email Mail Merge to HTML format using Word 2007??..  
Author Message
Lion
External


Since: Jun 17, 2007
Posts: 3



PostPosted: Sun Jun 17, 2007 12:30 pm    Post subject: Add attachment to e-mail Mail merge
Archived from groups: microsoft>public>word>mail (more info?)

Hello,
Does anybody know how to add an attachment to a mail merge e-mail from Word
(2007)? I have to send a message to about 45 recipients, giving them a
personalized username/password and at the same time I want to add a manual as
a (.pdf) attachment.
The username, password and email address are found in a (excel)file.
When I complete the mail merge, I don't have the opportunity to add an
attachment.
If this is not possible from Word, do you know a way to work around this?
(To me this looks like something that is done more often).
Thanks in advance.
Back to top
Doug Robbins - Word MVP
External


Since: Jul 14, 2006
Posts: 2658



PostPosted: Mon Jun 18, 2007 5:35 am    Post subject: Re: Add attachment to e-mail Mail merge [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

See the article "Mail Merge to E-mail with Attachments" at

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


--
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

"Lion" <Lion.DeleteThis@discussions.microsoft.com> wrote in message
news:17E041F3-5543-43E6-9E6B-C32CA76B43D0@microsoft.com...
> Hello,
> Does anybody know how to add an attachment to a mail merge e-mail from
> Word
> (2007)? I have to send a message to about 45 recipients, giving them a
> personalized username/password and at the same time I want to add a manual
> as
> a (.pdf) attachment.
> The username, password and email address are found in a (excel)file.
> When I complete the mail merge, I don't have the opportunity to add an
> attachment.
> If this is not possible from Word, do you know a way to work around this?
> (To me this looks like something that is done more often).
> Thanks in advance.
Back to top
Lion
External


Since: Jun 17, 2007
Posts: 3



PostPosted: Mon Jun 18, 2007 5:35 am    Post subject: Re: Add attachment to e-mail Mail merge [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Thanks a lot Doug,

I will try this today!



"Doug Robbins - Word MVP" wrote:

> See the article "Mail Merge to E-mail with Attachments" at
>
> http://word.mvps.org/FAQs/MailMerge/MergeWithAttachments.htm
>
>
> --
> 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
>
> "Lion" <Lion DeleteThis @discussions.microsoft.com> wrote in message
> news:17E041F3-5543-43E6-9E6B-C32CA76B43D0@microsoft.com...
> > Hello,
> > Does anybody know how to add an attachment to a mail merge e-mail from
> > Word
> > (2007)? I have to send a message to about 45 recipients, giving them a
> > personalized username/password and at the same time I want to add a manual
> > as
> > a (.pdf) attachment.
> > The username, password and email address are found in a (excel)file.
> > When I complete the mail merge, I don't have the opportunity to add an
> > attachment.
> > If this is not possible from Word, do you know a way to work around this?
> > (To me this looks like something that is done more often).
> > Thanks in advance.
>
>
>
Back to top
George Mancuso
External


Since: Jul 04, 2007
Posts: 1



PostPosted: Wed Jul 04, 2007 11:54 am    Post subject: RE: Add attachment to e-mail Mail merge [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Lion;

Did this work? I have the same problem exactly as you have described. I
sent out a personalized letter each week to over 300 people and would like to
add a PDF file as an attachment, but 2007 gives no option to do so. Please
advise.
--
George Mancuso
President
Gman Business Resources


"Lion" wrote:

> Hello,
> Does anybody know how to add an attachment to a mail merge e-mail from Word
> (2007)? I have to send a message to about 45 recipients, giving them a
> personalized username/password and at the same time I want to add a manual as
> a (.pdf) attachment.
> The username, password and email address are found in a (excel)file.
> When I complete the mail merge, I don't have the opportunity to add an
> attachment.
> If this is not possible from Word, do you know a way to work around this?
> (To me this looks like something that is done more often).
> Thanks in advance.
Back to top
Doug Robbins - Word MVP
External


Since: Jul 14, 2006
Posts: 2658



PostPosted: Thu Jul 05, 2007 4:53 pm    Post subject: Re: Add attachment to e-mail Mail merge [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

See the article "Mail Merge to E-mail with Attachments" at

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

It works with Word 2007 as well.

--
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

"George Mancuso" <GeorgeMancuso RemoveThis @discussions.microsoft.com> wrote in message
news:88C28B1B-77B8-4537-9457-99A7CD01CE1E@microsoft.com...
> Lion;
>
> Did this work? I have the same problem exactly as you have described. I
> sent out a personalized letter each week to over 300 people and would like
> to
> add a PDF file as an attachment, but 2007 gives no option to do so.
> Please
> advise.
> --
> George Mancuso
> President
> Gman Business Resources
>
>
> "Lion" wrote:
>
>> Hello,
>> Does anybody know how to add an attachment to a mail merge e-mail from
>> Word
>> (2007)? I have to send a message to about 45 recipients, giving them a
>> personalized username/password and at the same time I want to add a
>> manual as
>> a (.pdf) attachment.
>> The username, password and email address are found in a (excel)file.
>> When I complete the mail merge, I don't have the opportunity to add an
>> attachment.
>> If this is not possible from Word, do you know a way to work around this?
>> (To me this looks like something that is done more often).
>> Thanks in advance.
Back to top
Lion
External


Since: Jun 17, 2007
Posts: 3



PostPosted: Tue Jul 10, 2007 4:10 am    Post subject: RE: Add attachment to e-mail Mail merge [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Hello George,

I have not yet followed the procedure as described in the link.
Out of lack of time, I sent 2 seperate emails (one with the username /
password and the other with the attachment).
As soon as I have tryed it, I'll let you know!


"George Mancuso" wrote:

> Lion;
>
> Did this work? I have the same problem exactly as you have described. I
> sent out a personalized letter each week to over 300 people and would like to
> add a PDF file as an attachment, but 2007 gives no option to do so. Please
> advise.
> --
> George Mancuso
> President
> Gman Business Resources
>
>
> "Lion" wrote:
>
> > Hello,
> > Does anybody know how to add an attachment to a mail merge e-mail from Word
> > (2007)? I have to send a message to about 45 recipients, giving them a
> > personalized username/password and at the same time I want to add a manual as
> > a (.pdf) attachment.
> > The username, password and email address are found in a (excel)file.
> > When I complete the mail merge, I don't have the opportunity to add an
> > attachment.
> > If this is not possible from Word, do you know a way to work around this?
> > (To me this looks like something that is done more often).
> > Thanks in advance.
Back to top
Paul Williford
External


Since: Jul 12, 2007
Posts: 1



PostPosted: Thu Jul 12, 2007 10:18 am    Post subject: Re: Add attachment to e-mail Mail merge [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Doug --

I've tried your Macro.

I can see where it would work if the email being sent to folks is identical,
but we're wanting to send individualized emails out to folks all with the
same attachment.

When I tried following your instructions and completed my merge on the
second document then executed the macro, it successfully sent the first email
with attachment but all other recipients received a blank email with the
attachment.

What am I doing wrong?

Thanks,

Paul


"Doug Robbins - Word MVP" wrote:

> See the article "Mail Merge to E-mail with Attachments" at
>
> http://word.mvps.org/FAQs/MailMerge/MergeWithAttachments.htm
>
>
> --
> 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
>
> "Lion" <Lion.TakeThisOut@discussions.microsoft.com> wrote in message
> news:17E041F3-5543-43E6-9E6B-C32CA76B43D0@microsoft.com...
> > Hello,
> > Does anybody know how to add an attachment to a mail merge e-mail from
> > Word
> > (2007)? I have to send a message to about 45 recipients, giving them a
> > personalized username/password and at the same time I want to add a manual
> > as
> > a (.pdf) attachment.
> > The username, password and email address are found in a (excel)file.
> > When I complete the mail merge, I don't have the opportunity to add an
> > attachment.
> > If this is not possible from Word, do you know a way to work around this?
> > (To me this looks like something that is done more often).
> > Thanks in advance.
>
>
>
Back to top
Doug Robbins - Word MVP
External


Since: Jul 14, 2006
Posts: 2658



PostPosted: Fri Jul 13, 2007 2:17 am    Post subject: Re: Add attachment to e-mail Mail merge [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

The mail merge that produces the individualised letters must be executed
with the destination being a new document and then the macro must be run
when that new document (the one containing each of the individual letters)
is the active document. It sounds like you have run the macro when you are
perhaps previewing the results of the mail merge and have not actually
executed it.

--
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

"Paul Williford" <Paul Williford DeleteThis @discussions.microsoft.com> wrote in message
news:11FC8947-6A59-47CC-809D-EF7A6EE86A4F@microsoft.com...
> Doug --
>
> I've tried your Macro.
>
> I can see where it would work if the email being sent to folks is
> identical,
> but we're wanting to send individualized emails out to folks all with the
> same attachment.
>
> When I tried following your instructions and completed my merge on the
> second document then executed the macro, it successfully sent the first
> email
> with attachment but all other recipients received a blank email with the
> attachment.
>
> What am I doing wrong?
>
> Thanks,
>
> Paul
>
>
> "Doug Robbins - Word MVP" wrote:
>
>> See the article "Mail Merge to E-mail with Attachments" at
>>
>> http://word.mvps.org/FAQs/MailMerge/MergeWithAttachments.htm
>>
>>
>> --
>> 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
>>
>> "Lion" <Lion DeleteThis @discussions.microsoft.com> wrote in message
>> news:17E041F3-5543-43E6-9E6B-C32CA76B43D0@microsoft.com...
>> > Hello,
>> > Does anybody know how to add an attachment to a mail merge e-mail from
>> > Word
>> > (2007)? I have to send a message to about 45 recipients, giving them a
>> > personalized username/password and at the same time I want to add a
>> > manual
>> > as
>> > a (.pdf) attachment.
>> > The username, password and email address are found in a (excel)file.
>> > When I complete the mail merge, I don't have the opportunity to add an
>> > attachment.
>> > If this is not possible from Word, do you know a way to work around
>> > this?
>> > (To me this looks like something that is done more often).
>> > Thanks in advance.
>>
>>
>>
Back to top
wrongolia



Joined: Nov 12, 2007
Posts: 1



PostPosted: Mon Nov 12, 2007 11:19 am    Post subject: [Login to view extended thread Info.]

I have been attempting the actions as outlined at: http://word.mvps.org/FAQs/MailMerge/MergeWithAttachments.htm without joy.

Concerning the final stage before the macro, am I right to assume that I write the body of my email in the same original word document that I created the directory type tabled merge in? Must I save it? Must the directory be the same as the attachment? I am therefore now creating a further directory type mail merge document, with the body of my email as its content, and merging it to one single document? I then run the macro from this screen?

When I currently run the macro an "open word document" dialogue box immeadiately opens. Do I open the attachment at this stage or do I close this box? This is followed by a request for the subject line and then the warning message that you mention, but no emails are sent. Can you help or point me in the right direction.
Back to top
apapadop



Joined: Jun 06, 2008
Posts: 1



PostPosted: Fri Jun 06, 2008 11:59 am    Post subject: [Login to view extended thread Info.]

Hi, I attempted a re-write of Doug's tutorial as it is excellent technically but difficult to follow for confused people who've never done this before... here it is, I hope you find it easier to follow.

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/MergeWithAttachments.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 to use the macro to send HTML email, I'd love to hear.

Hope this helps someone...

-A
Back to top
klr



Joined: Jul 11, 2008
Posts: 1



PostPosted: Fri Jul 11, 2008 10:42 am    Post subject: [Login to view extended thread Info.]

apapadop wrote:
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 to use the macro to send HTML email, I'd love to hear.


After having changed the line:

.Body = ActiveDocument.Content

to:

.HTMLBody = ActiveDocument.Content

the e-mail will get sent off in HTML format but you have to note the macro gets the data from Word as plain text so in order to get the email formatted properly some proper HTML tags need to be used in the document . For expample:

Hello <b>World</b>,<br>
<br>
<i>This is an exapmle.</i>
Back to top
almandine



Joined: Jul 17, 2008
Posts: 1



PostPosted: Thu Jul 17, 2008 2:05 pm    Post subject: [Login to view extended thread Info.]

I won't pretend to understand all the macro stuff and the script, but it works! I'm using Word, Access , Excel and Outlook 2007 with Exchange email and you have just saved me a heck of a lot of time. Thanks very much Doug for the initial instructions and script and also apapadop for putting it into step by step format.
Back to top
Kazz



Joined: Aug 04, 2008
Posts: 1



PostPosted: Mon Aug 04, 2008 1:30 pm    Post subject: Re: Add attachment to e-mail Mail merge [Login to view extended thread Info.]

Did you eventually do an email merge from word 2007 with attachments?
I have tried following the instructions but it is not working for me.
Back to top
SnoBunny



Joined: Oct 30, 2008
Posts: 1



PostPosted: Thu Oct 30, 2008 3:58 pm    Post subject: Don't know what I am doing wrong [Login to view extended thread Info.]

Have tried this step by step three times now and when I run the macro I get a:
compile error user defined type not defined
and it highlights "Dim oOutlookApp As Outlook.Application"
I am in Office 2007.
Any help would be greatly appreciated!
Back to top
nicklajay



Joined: Dec 03, 2008
Posts: 1



PostPosted: Wed Dec 03, 2008 5:30 pm    Post subject: Re: Don't know what I am doing wrong [Login to view extended thread Info.]

Snobunny, I had the same problem as you, it turned out that the "Microsoft Outlook 12.0 Object Library" had somehow unchecked itself. Correct that at the point where you have the error and you should be fine.
Back to top
JeniQ



Joined: Dec 05, 2008
Posts: 7



PostPosted: Fri Dec 05, 2008 2:07 pm    Post subject: [Login to view extended thread Info.]

apapadop:

In Step 7 of your excellent instructions, you suggest "This data source should have all information necessary to fill in the merge fields of your Word file, but no attachment information. "

I disagree. I use the same file as the source file for both the Directory merge process and the Email merge process. It seems to work well and it simplifies this complex process.
Any reason why it shouldn't be working? Wink

Also, nicklajay, your solution is correct but I found it a little obtuse because there was no indication as to *where* to make the change you suggested. So, in case anyone else has this problem but doesn't quite understand how to solve it, it's Step 2 of apapadop's instructions:
"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."

All in all, a terrific thread full of helpful information!
Back to top
JeniQ



Joined: Dec 05, 2008
Posts: 7



PostPosted: Fri Dec 05, 2008 2:33 pm    Post subject: Mail Merge w/Attachment Flowchart [Login to view extended thread Info.]

I found this process to be quite complex at first, but I know it will be easy for tasks that recurr frequently because many pieces of the puzzle remain static and will not need to be recreated each time. With that in mind, I created a flowchart that I think will help keep my users organized when using this.

If you'd like the flowchart, let me know and I'll be happy to send it to you. It's a PPT slide.
Back to top
sumishromi



Joined: Dec 08, 2008
Posts: 3



PostPosted: Mon Dec 08, 2008 12:40 am    Post subject: [Login to view extended thread Info.]

Hi JeniQ,

Can you please send me the flowchart or PPI doc... which will make my life easy with mail merge. My mail Id is sumishromi.DeleteThis@gmail.com

Many Thanks,
Lakshmi
Back to top
manic



Joined: Dec 08, 2008
Posts: 1



PostPosted: Mon Dec 08, 2008 2:47 am    Post subject: [Login to view extended thread Info.]

I tried all steps and everything goes smooth, only the problem of plain text cannot solve...

I cant find the line Body = ActiveDocument in the VBA code, thus, cannot fix the problem. Did anyone have the same problem with me? And how to send email of formated Word with attachment ?

klr wrote:
apapadop wrote:
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 to use the macro to send HTML email, I'd love to hear.


After having changed the line:

.Body = ActiveDocument.Content

to:

.HTMLBody = ActiveDocument.Content

the e-mail will get sent off in HTML format but you have to note the macro gets the data from Word as plain text so in order to get the email formatted properly some proper HTML tags need to be used in the document . For expample:

Hello World,<br>
<br>
This is an exapmle.
Back to top
sumishromi



Joined: Dec 08, 2008
Posts: 3



PostPosted: Tue Dec 09, 2008 3:04 am    Post subject: [Login to view extended thread Info.]

These steps work cool.. But I dint get any final output. The VB editor is highlighting "Dim oOutlookApp As Outlook.Application"... Can anyone send clear steps to em from the beginning as I am not an expert in VB.

Thanks in advance,
Lakshmi
Back to top
Display posts from previous:   
Post new topic   General Reply to Topic (not reply to a specific post)    Forums Home -> Mail All times are: Eastern Time (US & Canada) (change)
Goto page 1, 2, 3
Page 1 of 3

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum