The code is:
Code:
Option Explicit
'reserve memory for an application variable
Private WithEvents wdApp As Word.Application
Private Sub Document_Open()
'assign Word to the application variable
If wdApp Is Nothing Then
Set wdApp = ThisDocument.Application
End If
End Sub
Private Sub wdApp_WindowBeforeDoubleClick(ByVal Sel As Selection, Cancel As Boolean)
MsgBox Sel.Information(wdInHeaderFooter)
Cancel = True
DocumentInfo.Show
End Sub
I added the message box to show the value of Information(wdInHeaderFooter) for Sel. The value is always false no matter which part is double clicked.
It seems the Sel object has no information about which part is double clicked but another question is, why it is in the signiture of this event?
Thanks