Merge fields, which you insert into the main document, instruct Word where to print information from the data source. When you perform the mail merge, Word replaces merge fields in the main document with information from the data source. Each row (or record) in the data source produces an ...
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 can be merged into the same merge document (for example, a sheet of mailing labels). Applies to 產品版本 Word primary interop assembly...
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 Rec...
這個範例會假設您已經在一般宣告中宣告了名稱為 MailMergeApp 的應用程式變數,並且已將該變數設定為與 Microsoft Word Application 物件相同。 VB 複製 Private Sub MailMergeApp_MailMergeBeforeRecordMerge(ByVal _ Doc As Document, Cancel As Boolean) Dim intZipLength As Integer intZipLength = Len(...
表达 返回“MailMergeDataSource”对象的表达式。备注如果Microsoft Word 不能确定数据源中的记录数,则 RecordCount 属性将返回值 -1。示例此示例循环访问数据源中的记录,并验证本示例中的邮政编码字段 (字段 6,) 不小于 5 位。 如果少于五位,则从邮件合并中删除该记录。 如果要确保将定位代码添加到邮政编码中,...
public virtual event Microsoft.Office.Interop.Word.ApplicationEvents4_MailMergeBeforeRecordMergeEventHandler MailMergeBeforeRecordMerge; 事件类型 ApplicationEvents4_MailMergeBeforeRecordMergeEventHandler 实现 MailMergeBeforeRecordMerge 适用于 产品版本 Word primary interop assembly Latest 反馈...
WdMailMergeActiveRecord 列舉 (Word) 發行項 2023/04/07 會指定合併列印結果集中的使用中記錄。 名稱值描述 wdFirstDataSourceRecord-6資料來源中的第一筆記錄。 wdFirstRecord-4結果集中的第一筆記錄。 wdLastDataSourceRecord-7資料來源中的最後一筆記錄。
Click on Main Document Setup on the Mail merge toolbar. Select Labels as the document type. Hit OK. A new POP up window opens. Choose the type of labels you're printing and hit OK. Now we need to add the addresses stored in an Excel file. ...
程序集: Microsoft.Office.Interop.Word.dll 表示Microsoft Word 中的邮件合并功能。 C# 复制 [System.Runtime.InteropServices.Guid("00020920-0000-0000-C000-000000000046")] public interface MailMerge 属性 GuidAttribute 注解 MailMerge使用 属性可返回 MailMerge 对象。 邮件合并 对象始终是可用而...
Microsoft.Office.Tools.Word.dll, Microsoft.Office.Tools.Word.v4.0.Utilities.dllOccurs after each record in the data source successfully merges in a mail merge. C# 复制 event EventHandler MailMergeAfterRecordMerge; Event Type EventHandler Examples The following code example displays a message whe...