View Single Post
  #4   Report Post  
Mmiller
 
Posts: n/a
Default

Just tried to follow instructions you wrote "Mail Merge to E-mail with
Attachments.
I created the macro, but it was my first. I simply copied and pasted the
info from your articleinto the visual basic editor so as to avoid typos, then
added the macro to the tool bar. But I get following error message when I run
the macro:
Compile Error:
User-defined type not defined.
Then the macro editor is opened and the following is highlighted:
(The middle line is highlighted - I've included a line before and after to
identify)

Dim bStarted As Boolean

Dim oOutlookApp As Outlook.Application

Dim oItem As Outlook.MailItem
Since I've copied and pasted, I don't know how it is in the macro. I think
it may have been in the course of when and where to run the macro. I had no
trouble creating the directory merge, and then using it as the source for my
data in the email merge. But I have tried running this macro at every step in
the process of creating the email merge and I get the same error message. The
end resut is an email merge that does exactly as it should - but there is
only a reference to the attachment in the email - no real attachment.

"Doug Robbins" wrote:

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

http://word.mvps.org/FAQs/MailMerge/...ttachments.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
"Lily@Insight" wrote in message
...
I have an SQL database that is queried. I use these queries to mail merge
in
word - with the output going to Outlook - so that each individual email is
sent to the individual for whom it's intended. The only problem is that I
want to also include a PDF attachment.

Is this at all possible? Or am I dreaming???