MailMerge.CreateHeaderSource(String, Object, Object, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Creates a Microsoft Word document that stores a header record that's used in place of the data source header record in a mail merge.
public void CreateHeaderSource (string Name, ref object PasswordDocument, ref object WritePasswordDocument, ref object HeaderRecord);
abstract member CreateHeaderSource : string * obj * obj * obj -> unit
Public Sub CreateHeaderSource (Name As String, Optional ByRef PasswordDocument As Object, Optional ByRef WritePasswordDocument As Object, Optional ByRef HeaderRecord As Object)
Parameters
- Name
- String
Required String. The path and file name for the new header source.
- PasswordDocument
- Object
Optional Object. The password required to open the new header source.
- WritePasswordDocument
- Object
Optional Object. The password required to save changes to the new header source.
- HeaderRecord
- Object
Optional Object. 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.
Remarks
This method attaches the new header source to the specified document, which becomes a main document if it's not one already.
The new header source uses a table to arrange mail merge field names.
Avoid using hard-coded passwords in your applications. If a password is required in a procedure, request the password from the user, store it in a variable, and then use the variable in your code.
Applies to
피드백
https://aka.ms/ContentUserFeedback
출시 예정: 2024년 내내 콘텐츠에 대한 피드백 메커니즘으로 GitHub 문제를 단계적으로 폐지하고 이를 새로운 피드백 시스템으로 바꿀 예정입니다. 자세한 내용은 다음을 참조하세요.다음에 대한 사용자 의견 제출 및 보기