How to insert pdf attachment with word email merge?

J

Jim123

I trying attach a .pdf file with an email being mailed to a list. For the
life of me I can't find where to insert the attachment file to the merge
email doc file. Using office 2007. Any help would be appreciated.

Thanks
 
D

Doug Robbins - Word MVP

The procedure must be followed exactly for the process to be successful and
putting the code in a zip file would have no benefit.

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

LyndieBee

I'm using the MergeWithAttachments procedure and followed all the steps. I
think I'm ALMOST there but am having a problem. (Microsoft Outlook 11.0
Object Library IS marked.) I'm using Office 2003, I've made and saved the
directory-type file with the email addresses and document name, I've created
the letter-type merge with the appropriate info and fields. When I run the
macro, however, things go on and on and on!!! The 3 address that I'm
expecting to see come by and I answer Yes to sending them (I'm doing this
manually since there are only 3 in my test file.) But then it keeps going
with Document 4, Document 5, Document 6, etc. I finally Ctrl+Break to get
the process to stop and get a macro error message. When I choose debug, this
is the part of the macro that is pointed to:

End With
Set oItem = Nothing
ActiveDocument.Close wdDoNotSaveChanges
Counter = Counter + 1
Wend

I copied and pasted from the article but have looked it over as well to be
sure I picked up everything. Any ideas?
-Lyndie
 
D

Doug Robbins - Word MVP

See response in your new thread.

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

Abdul

Hi

Your mail merge method works fine with attachemnt, but there is a problem in
body of the message, when you sent to 5 email IDs, the first person only get
the message in the body, but others can received only attachment without text
in their body of the email, can you please tell me how to do it?

Abdul
 
D

Doug Robbins - Word MVP

You are not running the macro when a document created by executing the merge
that contains the message that is to be in the body of the emails to a new
document is the active document.

Please read the instructions again and follow them exactly.

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

Abdul

Let me explain what i did
1) I have created a seperate directory in a word document according to your
instruction. I can see the result in the other page that shows all the email
addresses and attachement path in the table and saved with a name (xyz.doc),
2) I closed the file (xyz.doc).
3) Opened a new document file and typed with a message to send, also i have
inlcuded your macro in this new document, when I try to run your macro, it
asked me a file to execute, i have choosen xyz.doc, then it prompted me to
enter a subject, i entered a subject and pressed OK, it had sent email with
my outlook.
4) when opened a mail that i have sent, the first mail that contain Message
with attachment, but the other all emails that contains only attachment
without Message.

Please tell me which step i missed out.

- Abdul
 
D

Doug Robbins - Word MVP

This is the step that you missed:

"Then execute to a new document the mail merge that you want to send out by
email with the attachments and with the result of execution of that mail
merge on the screen, run a macro containing the following code."

The document that you created in your step 3 must be a mail merge main
document that has attached to it the same data source as you used to create
xyz.doc. You must then execute the merge of the step 3 document to a new
document. There is no need to save this document, but it must be the active
document when you run the macro.

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

Abdul

Thanks for your immediate response, I have followed your steps that you have
mentioned, but still not it's the same thing happening, could you please
explain in a simple steps? I am very new to macros.

-Abdul
 
D

Doug Robbins - Word MVP

It has nothing to do with macros. The document that is the active document
when you run the macro must have the same number of sections as there are
records in the data source and also records in the directory type mail merge
document.

How many sections does that document have?

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

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