If ActiveDocument.MailMerge.DataSource.ActiveRecord = _ ActiveDocument.MailMerge.DataSource.RecordCount Then bDone = True End If ActiveDocument.MailMerge.DataSource.ActiveRecord = wdNextRecord Loop End Sub 在“工具”菜单上,指向“宏”,然后选择“宏”。 选择“MergeToEmail”,然后选择“运行”。
I have Word 2010 and created a mail merge document to pull records from Excel, there are 4 rows of records from Excel and I have the merge setup as follows: «SumOfShares_Exercised» «NARRATIVE»«Next Record» «SumOfShares_Exercised» «NARRATIVE» «Next Record» ...
返回一个 MailMergeDataSource 对象,该对象引用附加到邮件合并主文档的数据源。 此为只读属性。语法expression。 DataSource表达 一个代表“MailMerge”对象的变量。示例本示例显示附加到活动文档的数据源的名称。VB 复制 If ActiveDocument.MailMerge.DataSource.Name <> "" Then _ MsgBox ActiveDocument.MailMerge....
wdNextRecord-2結果集中的下一筆記錄。 wdNoActiveRecord-1沒有使用中記錄。 wdPreviousDataSourceRecord-9資料來源中的上一筆記錄。 wdPreviousRecord-3結果集中的上一筆記錄。 支援和意見反應 有關於 Office VBA 或這份文件的問題或意見反應嗎? 如需取得支援服務並提供意見反應的相關指導,請參閱Office VBA 支援與...
默认值为:localhost:25 -a 附件列表,多个附件以空格间隔,亦支持使用多个-a选项 -cc 抄送列表,...
If ActiveDocument.MailMerge.MainDocumentType <> _ wdNotAMergeDocument Then With ActiveDocument.MailMerge .ViewMailMergeFieldCodes = False .DataSource.ActiveRecord = wdNextRecord End With End If 本示例返回 Main2.doc 中的活动记录的数字位置。 VB 复制 Dim intRecordNumber as Integer If Documents("...
程序集: Microsoft.Office.Interop.Word.dll C# 复制 public virtual event Microsoft.Office.Interop.Word.ApplicationEvents4_MailMergeBeforeRecordMergeEventHandler MailMergeBeforeRecordMerge; 事件类型 ApplicationEvents4_MailMergeBeforeRecordMergeEventHandler 实现 MailMergeBeforeRecordMerge 适用于...
publicMicrosoft.Office.Interop.Word.MailMergeFieldAddNext(Microsoft.Office.Interop.Word.Range Range); Parameters Range Range RequiredRangeobject. The location for the NEXT field. Returns MailMergeField Remarks A NEXT field advances to the next data record so that data from more than one record ...
Insert the fields Having picked the address book or data file you wish to use, Word will verify the data file, read the field names and insert 'Next Record' fields in all the cells except the first (if you start from an existing document, the next record fields are added later). ...
if you insert anAddress blockin the first label position, and then tapUpdate all labelson step 4 of 6 in the Mail Merge wizard, only the first row and the last two labels on the last row will be updated with theAddressBlockfield. The other labels will only have theNext Recordfield inse...