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_XMLSelectionChangeEventHandler Delegate 

A Delegate type used to add an event handler for the XMLSelectionChange event. The XMLSelectionChange event occurs when the parent XML node of the current selection changes.

Namespace: Microsoft.Office.Interop.Word
Assembly: Microsoft.Office.Interop.Word (in

Sub Sub1(Sel As Selection, _
	OldXMLNode As XMLNode, _
	NewXMLNode As XMLNode, _
	Reason As Integer)
End Sub
Dim applicationEvents4_XMLSelectionChangeEventHandler1 As New ApplicationEvents4_XMLSelectionChangeEventHandler(AddressOf Sub1)

public delegate void ApplicationEvents4_XMLSelectionChangeEventHandler(
	[In] Selection Sel, 
	[In] XMLNode OldXMLNode, 
	[In] XMLNode NewXMLNode, 
	[In] ref int Reason
public delegate void ApplicationEvents4_XMLSelectionChangeEventHandler(
	/*in*/Selection Sel, 
	/*in*/XMLNode OldXMLNode, 
	/*in*/XMLNode NewXMLNode, 
	/*in*/int Reason
In JScript, you can use the delegates in the .NET Framework, but you cannot define your own.



Selection. The text selected, including XML elements. If no text is selected, the Sel parameter returns either nothing or the first character to the right of the insertion point.


XMLNode. The XML node from which the insertion point is moving.


XMLNode. The XML node to which the insertion point is moving.


Required Integer. The reason why the selection has changed. Can be any of the WdXMLSelectionChangeReason constants.

Development Platforms

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

Target Platforms

Community Additions