CreateHeaderSource Method

See Also         Example         Applies To

Creates a Word document that stores a header record that's used in place of the data source header record in a mail merge. This method attaches the new header source to the specified document, which becomes a main document if it's not one already.

Note   The new header source uses a table to arrange mail merge field names.

Syntax

expression.CreateHeaderSource(Name, PasswordDocument, WritePasswordDocument, HeaderRecord)

expression   Required. An expression that returns a MailMerge object.

Name   Required String. The path and file name for the new header source.

PasswordDocument   Optional Variant. The password required to open the new header source.

WritePasswordDocument   Optional Variant. The password required to save changes to the header source.

HeaderRecord   Optional Variant. A string that specifies the field names for the header record. If this argument is omitted, the standard header record is used: "Title, FirstName, LastName, JobTitle, Company, Address1, Address2, City, State, PostalCode, Country, HomePhone, WorkPhone." To separate field names in Windows, use the list separator specified in Regional Settings in Control Panel.