ApplicationEvents4_MailMergeBeforeMergeEventHandler Delegate
A Delegate type used to add an event handler for the MailMergeBeforeMerge event. The MailMergeBeforeMerge event occurs when a merge is executed before any records merge.
Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in microsoft.office.interop.word.dll)
Usage
Sub Sub1(Doc As Document, _
StartRecord As Integer, _
EndRecord As Integer, _
Cancel As Boolean)
End Sub
Dim applicationEvents4_MailMergeBeforeMergeEventHandler1 As New ApplicationEvents4_MailMergeBeforeMergeEventHandler(AddressOf Sub1)
Syntax
Public Delegate Sub ApplicationEvents4_MailMergeBeforeMergeEventHandler( _
<InAttribute()> ByVal Doc As Document, _
<InAttribute()> ByVal StartRecord As Integer, _
<InAttribute()> ByVal EndRecord As Integer, _
<InAttribute(), OutAttribute()> ByRef Cancel As Boolean _
)
public delegate void ApplicationEvents4_MailMergeBeforeMergeEventHandler(
[In] Document Doc,
[In] int StartRecord,
[In] int EndRecord,
[In, Out] ref bool Cancel
);
public delegate Void ApplicationEvents4_MailMergeBeforeMergeEventHandler(
Document^ Doc,
Int32 StartRecord,
Int32 EndRecord,
&Boolean Cancel
);
public delegate void ApplicationEvents4_MailMergeBeforeMergeEventHandler(
/*in*/Document Doc,
/*in*/int StartRecord,
/*in*/int EndRecord,
/*in*/boolean Cancel
);
In JScript, you can use the delegates in the .NET Framework, but you cannot define your own.
Parameters
- Doc
The mail merge main document.
- StartRecord
The first record in the data source to include in the mail merge.
- EndRecord
The last record in the data source to include in the mail merge.
- Cancel
True stops the mail merge process before it starts.
Platforms
Development Platforms
Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000