Share via


MailMerge.MailAsAttachment Property

Word Developer Reference

True if the merge documents are sent as attachments when the mail merge destination is an e-mail message or a fax. Read/write Boolean.

Syntax

expression.MailAsAttachment

expression   An expression that returns a MailMerge object.

Example

This example performs a mail merge operation and sends the merge results as attachments to e-mail messages. The e-mail addresses are stored in the MailAddress merge field.

Visual Basic for Applications
  With Documents("Main.doc").MailMerge
    .MailAsAttachment = True
    .Destination = wdSendToEmail
    .MailSubject = "Special offer"
    .MailAddressFieldName = "MailAddress"
    .Execute
End With

See Also