Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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)

public delegate void ApplicationEvents4_MailMergeBeforeMergeEventHandler(
	[In] Document Doc, 
	[In] int StartRecord, 
	[In] int EndRecord, 
	[In, Out] ref bool 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.

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, and Windows 2000

Target Platforms

Community Additions

Show:
© 2015 Microsoft