Results 1 to 6 of 6
  1. #1
    New Lounger
    Join Date
    Jan 2001
    Location
    Maryland, USA
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Mailmerge Doc to Outlook Email (A2K/Office 2000 )

    I know there is probably a simple solution to this problem, but I'm at wits end trying to get it to work...

    I'm creating a mailmerge doc from Access which I need to send to Outlook as the body of an emial and not an attachment. I've tried both "sendobject" and creating a new Outlook Item. My problem is sending the mailmerge document as the email body. Any ideas? I'll post my code if anyone needs to see it.

    Thanks,
    Lisa

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

    Re: Mailmerge Doc to Outlook Email (A2K/Office 2000 )

    I assume you are actually creating a merged document in Word which you want to send as individual emails. Assuming that is the case, there is an option in Word where you can turn off sending the document as an attachment. Also note that there is a known feature in Word 2000 that limits an email body to less than 32 KB. MS knowledge base article 269174 describes the problem and some possible workarounds. If my assumption is off base, please post more details and we'll do our best to help you.
    Wendell

  3. #3
    New Lounger
    Join Date
    Jan 2001
    Location
    Maryland, USA
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mailmerge Doc to Outlook Email (A2K/Office 2000 )

    Wendell, thanks for your reply.

    The mailmerge works fine and I can send the document as an Outlook email body from within Word. My problem is in automating the process through Access. I can create the email with the correct email address and subject, but cannot seem to get the merged document into the email. Any ideas?

    Thanks again!
    Lisa Z.

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

    Re: Mailmerge Doc to Outlook Email (A2K/Office 2000 )

    Are you trying to actually run the Word mail merge from Access, or are you trying to build an Outlook email on the fly inside Access. Either approach can do the trick, but the Word merge is much less involved from a code perspective. In point of fact most of our clients simply initiate the merge to email from Word, using Access as the data source. That way they have a bit more control and can see how many emails are going to be generated. You can do the same thing of course in Access with VBA and give an idea of how much data is being shipped across, but again more code is required. If you are using the merge process, you might look at this Woody's Access Watch column that we authored. Hope this helps.
    Wendell

  5. #5
    New Lounger
    Join Date
    Jan 2001
    Location
    Maryland, USA
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mailmerge Doc to Outlook Email (A2K/Office 2000 )

    Thanks again Wendell.

    The scenerio... Click button on Access Data Form... Get mailmerge document... Merge data into new document... Email new document to recipient...

    Here is my VBA code. It's relatively simple.

    Private Sub SendEmail_Click()

    Dim wdDoc As Object
    Dim wdNewDoc As Object
    Dim olApp As New Outlook.Application
    Dim olMail As Outlook.MailItem

    DoCmd.OpenQuery "Data Query", acViewNormal, acReadOnly

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

    Re: Mailmerge Doc to Outlook Email (A2K/Office 2000 )

    Are you trying to send one document to a group of people with no customization for individual people, or are you trying to send a customized document to each person one at a time? If it's the latter, you can simply let Word do it's magic. If it's the former, then you need to open the Word document, select the entire thing, and then set the body equal to that. Otherwise, Outlook gets only the first line of the document, which is probably the title in your case. Based on what you have provided, it looks to me like you are doing one email at a time, so it might be simpler to not have Word do the merge, and simply do the text customization in Access VBA and create the document that way. For one thing, it takes a while for Word to do it's magic with the merge, and Access would be a fair bit quicker. Not sure this rambling helps, so post back if you aren't making progress.
    Wendell

Posting Permissions

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