MailFormat Property

Microsoft Word Visual Basic

constant that represents the format to use when the mail merge destination is an e-mail message. Read/write.

WdMailMergeMailFormat can be one of these WdMailMergeMailFormat constants.
wdMailFormatHTML Sends mail merge e-mail documents using HTML format.
wdMailFormatPlainText Sends mail merge e-mail documents using plain text.

expression.MailFormat

expression    Required. An expression that returns a MailMerge object.

Remarks

The MailFormat property is ignored if the MailAsAttachment property is set to True.

Example

This example merges the active document to an e-mail message and formats it using HTML.

Sub MergeDestination()
    With ActiveDocument.MailMerge
        .Destination = wdSendToEmail
        .MailAsAttachment = False
        .MailFormat = wdMailFormatHTML
        .Execute
    End With
End Sub