Results 1 to 6 of 6
  1. #1
    5 Star Lounger
    Join Date
    May 2001
    Location
    Patterson Lakes, Melbourne, Victoria, Australia
    Posts
    637
    Thanks
    0
    Thanked 0 Times in 0 Posts

    email merge formatted docs (2000 & 2002)

    Anyone know of code that I could adapt to email merge from Access using formatted Word documents, not as attachments? Generally up to 300 emails at a time. My code currently sends as text, in bunches of 50. But I would dearly love to be able to send formatted docs.
    Ideally this has to work in Office 2002 & 2000. I use Outlook.
    Regards,
    Peter

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: email merge formatted docs (2000 & 2002)

    You can control Word from Access using Automation. See the following tutorials on WendellB's website:
    Managing Merges with Access
    Automation 101

  3. #3
    5 Star Lounger
    Join Date
    May 2001
    Location
    Patterson Lakes, Melbourne, Victoria, Australia
    Posts
    637
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: email merge formatted docs (2000 & 2002)

    Nothing I can see there that shows me how to send formatted Word docs as email merge using VBA. Normal mail merge from within Access is no great effort. To avoid all the problems mentioned in those refs, I always build a Word doc and use that as my data source, that way it
    Regards,
    Peter

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: email merge formatted docs (2000 & 2002)

    Basically, you'd write Word code to perform the mail merge to e-mail, but execute this from Access using Automation. See the MSKB article How to use automation to run Word 2000 mail merge from Access 2000 mentioned by Wendell. For a merge to e-mail, you would have to set some extra properties:

    With wrdDoc.MailMerge
    .MailAsAttachment = True
    tab].Destination = wdSendToEmail
    tab].MailSubject = "Subject for e-mail merge"
    tab].MailAddressFieldName = "MailAddress"
    tab].Execute
    End With

    where wrdDoc is the variable representing the main merge document.

  5. #5
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: email merge formatted docs (2000 & 2002)

    You should also be able to do it directly from Word 2000 if you set your default email type to HTML, and not have to resort to Automation - as I recall there is a check box option that you can turn off that specifies whether the Word document is to be sent as an attachment, or as the body of the message. I'm sure we used that process to send a personalized hyperlink to about 30,000 people a few years ago. Word 2002 may or may not give you that option - the mail merge was changed dramatically in Office XP.
    Wendell

  6. #6
    5 Star Lounger
    Join Date
    May 2001
    Location
    Patterson Lakes, Melbourne, Victoria, Australia
    Posts
    637
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: email merge formatted docs (2000 & 2002)

    Thanks Wendell. I frequently send letters to a group of people. I wanted to send them as emails to those who have email addresses and as paper to those without. Your suggestion works like a charm especially as I already have the latter drafted for the paper people. Simple solution, thanks again.
    Regards
    Regards,
    Peter

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •