If (e.ChangeType = "ContextNode") Then ' The XML selection or context has changed. ' Write your code here. Return End If ...