DataSource使用 属性可返回 MailMergeDataSource 对象。属性展开表 ActiveRecord 返回或设置活动邮件合并数据记录。 Application 返回一个 Application 对象,该对象代表 Microsoft Word 应用程序。 ConnectString 返回指定邮件合并数据源的连接字符串。 Creator 返回一个 32 位整数,它指示在其中创建指定...
使用DataSource 属性可返回 MailMergeDataSource 对象。 以下示例显示与活动文档相关联的数据源的名称。VB 复制 If ActiveDocument.MailMerge.DataSource.Name <> "" Then _ MsgBox ActiveDocument.MailMerge.DataSource.Name 以下示例显示与活动文档相关联的数据源中的域名。VB 复制 ...
MailMerge 对象 MailMerge 对象 方法 属性 Application DataSource DocumentUpdating EmailMergeEnvelope Parent SuppressBlankLines 类型 ViewMailMergeFieldCodes WizardState MailMergeDataField 对象 MailMergeDataFields 对象 MailMergeDataSource 对象 MailMergeDataSources 对象 ...
You can create a mail merge operation by using the Microsoft Word Mail Merge Wizard. This wizard is also available from Access, and lets you set up a mail merge process that uses a table or query in an Access database as the data source for form letters, e-ma...
會傳回代表 Microsoft Word 中可用之對應資料欄位的MappedDataFields集合。 語法 expression。MappedDataFields 表達會傳回 'MailMergeDataSource' 物件的運算式。 範例 本範例會針對 Word 中可用的對應資料欄位及所對應資料來源中的欄位,建立其索引標籤式清單。 本範例會假設目前文件是一份合併列印文件。
Important:No matter what type of file you use as a data source, be sure to save it on your local computer or a file share; saving at an HTTP location isn't supported for mail merge. Excel spreadsheetAn Excel spreadsheet works well as a data source for mail merge if ...
表达式 一个返回'MailMergeDataSource' 对象的表达式。备注如果Microsoft Word 不能确定数据源中的记录数,则 RecordCount 属性将返回值 -1。示例本示例遍历数据源中的记录,并验证本示例中第六个 (的邮政编码字段) 是否少于五位数字。 如果少于五位,则从邮件合并中删除该记录。 如果要确保将定位代码添加到邮政编码中...
一个代表“MailMergeDataSource”对象的变量。 备注 如果对象是在 Microsoft Word 中创建的, 则Creator 属性返回十六进制数字 4D535744,表示字符串“MSWD”。此属性主要用于 Macintosh,其中每个应用程序都有一个四个字符的创建者代码。 例如,Microsoft Word 提供了 MSWD 的创建者代码。 有关此属性的其他信息,请参阅...
ApplicationEvents4_MailMergeAfterMergeEventHandler ApplicationEvents4_MailMergeAfterRecordMergeEventHandler ApplicationEvents4_MailMergeBeforeMergeEventHandler ApplicationEvents4_MailMergeBeforeRecordMergeEventHandler ApplicationEvents4_MailMergeDataSourceLoadEventHandler ApplicationEvents4_MailMergeDataSourceValidate2Even...
Step 1: Set up your data source in Excel If you're using an Excel spreadsheet as your data source for a mail merge in Word, skip this step. If the data source is a .txt or a.csv file, use the Text Import Wizard to set up your data in Excel. ...