HeaderSourceName Property

Applies To

MailMergeDataSource object.

Description

Returns the path and file name of the header source attached to the specified mail merge main document. Read-only String.

See Also

HeaderSourceType property.

Example

If a header source is attached to the active document, this example displays the file name.

hName = ActiveDocument.MailMerge.DataSource.HeaderSourceName
If hName <> "" Then MsgBox hName
This example opens the header source attached to the active document if the source is a Word document.

Set dSource = ActiveDocument.MailMerge.DataSource
If dSource.HeaderSourceType = wdMergeInfoFromWord Then
    Documents.Open FileName:=dSource.HeaderSourceName
End If