locked
Word, Mail Merge, VBA. RRS feed

  • Question

  • Hi All,

    I have a simple bit of code that does a mailmerge.
    Emailing it from Word 2010
    Data from Excel 2010

    The email is sent and works correctly.

    No attachments.
    The word doc does contain several merged fields.
    For example {MERGEFIELD "Email"} and {MERGEFIELD "Ref"}
    That appear correctly within the body of the email.

    I want to add a little more to it.
    I wish to add a Bcc address.  However I can see no options for this.
    And to add the Ref merged field onto the end of the Subject line.

    Extract from code (not all of it)

    With ActiveDocument.MailMerge
            .Destination = wdSendToEmail
            .SuppressBlankLines = True
            .MailSubject = "Please read me."

     Any help would be greaful.

    Friday, January 7, 2011 1:25 PM

Answers

  • To do that, you will have to use a method and code along the lines of that in the article "Mail Merge to E-mail with Attachments" at:

    http://word.mvps.org/FAQs/MailMerge/MergeWithAttachments.htm
     -- Hope this helps.

    Doug Robbins - Word MVP,
    dkr[atsymbol]mvps[dot]org
    Posted via the Community Bridge

    "The Stone" wrote in message news:b370896c-311e-43b6-8e69-2320a5012156@communitybridge.codeplex.com...

    Hi All,

    I have a simple bit of code that does a mailmerge.
    Emailing it from Word 2010
    Data from Excel 2010

    The email is sent and works correctly.

    No attachments.
    The word doc does contain several merged fields.
    For example {MERGEFIELD "Email"} and {MERGEFIELD "Ref"}
    That appear correctly within the body of the email.

    I want to add a little more to it.
    I wish to add a Bcc address.  However I can see no options for this.
    And to add the Ref merged field onto the end of the Subject line.

    Extract from code (not all of it)

    With ActiveDocument.MailMerge
            .Destination = wdSendToEmail
            .SuppressBlankLines = True
            .MailSubject = "Please read me."



     Any help would be greaful.


    Doug Robbins - Word MVP dkr[atsymbol]mvps[dot]org
    Friday, January 7, 2011 2:02 PM