MailMergeDataSource.HeaderSourceType (Word)
Returns a value that indicates the way the header source is being supplied for the mail merge operation. Possible return values are wdMergeInfoFromAccessDDE - From Microsoft Access using Dynamic Data Exchange (DDE), wdMergeInfoFromExcelDDE - From Microsoft Excel using DDE, wdMergeInfoFromMSQueryDDE - From MSQuery using DDE, wdMergeInfoFromODBC - From an Open Database Connectivity (ODBC) connection, wdMergeInfoFromODSO - From an Office Data Source Object (ODSO), wdMergeInfoFromWord - From Microsoft Word, wdNoMergeInfo - No merge information provided.
Dim mmdsTemp As MailMergeDataSource
Set mmdsTemp = ActiveDocument.MailMerge.DataSource
If mmdsTemp.HeaderSourceType = wdMergeInfoFromWord Then
Documents.Open FileName:=mmdsTemp.HeaderSourceName
End If