HeaderSourceType Property

Applies To

MailMergeDataSource object.

Description

Returns a value that indicates the way the header source is being supplied for the mail merge operation. Can be one of the following WdMailMergeDataSource constants: wdMergeInfoFromAccessDDE, wdMergeInfoFromExcelDDE, wdMergeInfoFromMSQueryDDE, wdMergeInfoFromODBC, wdMergeInfoFromWord, or wdNoMergeInfo. Read-only Long.

See Also

HeaderSourceName property.

Example

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