MailAddressFieldName Property

Microsoft Word Visual Basic

MailAddressFieldName Property

       

Returns or sets the name of the field that contains e-mail addresses that are used when the mail merge destination is electronic mail. Read/write String.

expression.MailAddressFieldName

expression   Required. An expression that returns a MailMerge object.

Example

This example merges the document named "FormLetter.doc" with its attached data document and sends the results to the e-mail addresses stored in the Email merge field.

With Documents("FormLetter.doc").MailMerge
    .MailAddressFieldName = "Email"
    .MailSubject = "Amazing offer"
    .Destination = wdSendToEmail
    .Execute
End With