MailMerge.EditHeaderSource method (Word)
Opens the header source attached to a mail merge main document, or activates the header source if it is already open.
Syntax
expression. EditHeaderSource
expression Required. A variable that represents a 'MailMerge' object.
Remarks
If the mail merge main document doesn't have a header source, this method causes an error.
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:\Documents\Header.doc"
.EditHeaderSource
End With
This example opens the header source if the active document has an associated header file attached to it.
Dim mmTemp As MailMerge
Set mmTemp = ActiveDocument.MailMerge
If mmTemp.State = wdMainAndSourceAndHeader Or _
mmTemp.State = wdMainAndHeader Then
mmTemp.EditHeaderSource
End If
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for