Mailmerge with attachments

V

vkelpida

Greetings! I am using the macro provided by Doug Robbins in
http://word.mvps.org/faqs/mailmergewithattachmentscontent.htm. Using Outlook
2002 and Word 2002 on Windows XP.

Thank you, Doug, for making this code available. It is sorely needed!

However, ran into a couple of compile errors.

1. Dim oOutlookApp As Outlook.Application ... Outlook.Application was not
recognized, so I deleted the section that checks to see if Outlook is running
(because that's the only place in which it was used.

2. I followed (I think, but I guess not) the instructions ... created the
directory, performed a mailmerge, and left the resulting document in the
window. Ran the macro. Got a compile error ... Set
oItem=oOutlookApp.CreateItem(olMailItem) ... "Error 424 Object Required"

Is there something I'm doing wrong? When the instructions indicate to have
the result of the execution of the mail merge on the screen, does that mean
the document with all letters sequentially provided (which you get by "Edit
Individual Letters), or just the first one (without the "Edit Individual
Letters"?)

Thank you in advance for any help!

Vicki :)
 
V

vkelpida

Pursuing this further, I discovered that I had also deleted the

Dim oItem As Outlook.MailItem

Put it back in, and now I'm getting an error on it.

I checked to make sure that the References section in Visual Basic Editor
has Microsoft Office Outlook Object Library checked, and it is.

Hmmm ....

Thanks!
 
V

vkelpida

AHA! I discovered that the Office Object LIbrary must be referenced in the
"Normal" section because the macro for the new Word documents points back to
the macro in the "Normal" setting.

Tricky, tricky.

Now it's working great.

Thank you!
 

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