EditHeaderSource Method

Applies To

MailMerge object.

Description

Opens the header source attached to a mail merge main document, or activates the header source if it's already open.

Note If the mail merge main document doesn't have a header source, this method causes an error.

Syntax

expression.EditHeaderSource

expression Required. An expression that returns a MailMerge object.

See Also

OpenHeaderSource method.

Example

This example attaches a header source to the active document and then opens the header source.

With ActiveDocument.MailMerge
    .MainDocumentType = wdFormLetters
    .OpenHeaderSource Name:="C:\My Documents\Header.doc"
    .EditHeaderSource
End With
This example opens the header source if the active document has an associated header file attached to it.

Set MM = ActiveDocument.MailMerge
If MM.State = wdMainAndSourceAndHeader Or _
        MM.State = wdMainAndHeader Then
    MM.EditHeaderSource
End If