e-mail from Access via does not send merged Word document 
Author Message
 e-mail from Access via does not send merged Word document

Hi all,

I try to mail merge from Access to Word (which succeeds),
but then I want to send the generated letter as an
attachment with an e-mail message.  As a matter of fact
letters should be generated with each time another
addressee and diffrent information in it.  The query
generating the data works smoothly but the code gets stuck
on the .Execute line.

I get error 5630 telling me I have to input an addressee.

With oWord.ActiveDocument.MailMerge
    .DataSource.ActiveRecord = wdFirstRecord
    .ViewMailMergeFieldCodes = wdToggle
    .MailAddressFieldName = strEmailAddress
    .MailSubject = strSubject
    .Destination = wdSendToEmail
    .SuppressBlankLines = True
''''  the program generates an error on the next line


    With .DataSource
        .FirstRecord =
        .LastRecord =
    End With
    .Execute Pause:=False
End With

Why does it not function with e-mail ?  Or what do I have
to do to be able to send an e-mail via VBAcode ?

Thanks in advance,


Tue, 30 Aug 2005 05:30:53 GMT  
 [ 1 post ] 

 Relevant Pages 

1. Adding a picture into a word document while doing a mail merge

2. Mail Merge to a pre-existing word document via a macro

3. Word Mail Merge Err - Word could not merge...

4. mail-merge MS Word and MS Access via ASP

5. What is the syntax for printing out Mail Merge document in Word from Access Form

6. (Q211727) Mail merge document restored to normal document - Word 2000

7. ACCESS 97 - Sending Word Documents by Email

8. Word Mail merge to Outlook Email with PDF Attachment

9. Opening a Mail merged Document from word

10. Sending mail via alternate email account

11. Doing Single Record Word Merge Using Access Data

12. VBA - Email - Send HTML with Access Merge Field


Powered by phpBB® Forum Software