Attaches a mail merge header source to the specified document.
Note When a header source is attached, the first record in the header source is used in place of the header record in the data source.
Syntax
expression.OpenHeaderSource(Name, Format, ConfirmConversions, ReadOnly, AddToRecentFiles, PasswordDocument, PasswordTemplate, Revert, WritePasswordDocument, WritePasswordTemplate)
expression Required. An expression that returns a MailMerge object.
Name Required String. The file name of the header source.
Format Optional Variant. The file converter used to open the document. Can be one of the following WdOpenFormat constants: wdOpenFormatAllWord, wdOpenFormatAuto, wdOpenFormatDocument, wdOpenFormatEncodedText, wdOpenFormatRTF, wdOpenFormatTemplate, wdOpenFormatText, wdOpenFormatUnicodeText, or wdOpenFormatWebPages. The default value is wdOpenFormatAuto.
To specify an external file format, use the OpenFormat property with a FileConverter object to determine the value to use with this argument.
ConfirmConversions Optional Variant. True to display the Convert File dialog box if the file isn't in Word format.
ReadOnly Optional Variant. True to open the header source on a read-only basis.
AddToRecentFiles Optional Variant. True to add the file name to the list of recently used files at the bottom of the File menu.
PasswordDocument Optional Variant. The password required to open the header source document.
PasswordTemplate Optional Variant. The password required to open the header source template.
Revert Optional Variant. Controls what happens if Name is the file name of an open document. True to discard any unsaved changes to the open document and reopen the file; False to activate the open document.
WritePasswordDocument Optional Variant. The password required to save changes to the document data source.
WritePasswordTemplate Optional Variant. The password required to save changes to the template data source.