This documentation is archived and is not being maintained.

ApplicationEvents4_DocumentBeforePrintEventHandler Delegate 

A Delegate type used to add an event handler for the DocumentBeforePrint event. The DocumentBeforePrint event occurs before any open document is printed.

Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in microsoft.office.interop.word.dll)

'Usage
Sub Sub1(Doc As Document, _
	Cancel As Boolean)
End Sub
Dim applicationEvents4_DocumentBeforePrintEventHandler1 As New ApplicationEvents4_DocumentBeforePrintEventHandler(AddressOf Sub1)

public delegate void ApplicationEvents4_DocumentBeforePrintEventHandler(
	[In] Document Doc, 
	[In, Out] ref bool Cancel
);
public delegate void ApplicationEvents4_DocumentBeforePrintEventHandler(
	/*in*/Document Doc, 
	/*in*/boolean Cancel
);
In JScript, you can use the delegates in the .NET Framework, but you cannot define your own.

Parameters

Doc

The document that's being printed.

Cancel

False when the event occurs. If the event procedure sets this argument to True, the document isn't printed when the procedure is finished.

Development Platforms

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

Target Platforms

Show: