CreateHeaderSource Method Example

This example creates a header source with five field names and attaches the new header source named "Header.doc" to the active document.

ActiveDocument.MailMerge.CreateHeaderSource Name:="Header.doc", _
    HeaderRecord:="Name, Address, City, State, Zip"

This example creates a header source for the document named "Main.doc" (with the standard header record) and opens the data source named "Data.doc."

With Documents("Main.doc").MailMerge
    .CreateHeaderSource Name:="Fields.doc"
    .OpenDataSource Name:="C:\My Documents\Data.doc"
End With