Determining whether Endnotes pane is open

L

Larry

I know this has got to be simple, but I'm not finding it. How do I
return whether the cursor is located in an open pane displaying the
endnotes?

Thanks,
Larry
 
L

Larry

This works, but is crude. Can any one point to a better way?

Dim r As Range
Set r = ActiveDocument.StoryRanges(wdEndnotesStory)

If Selection.Start > r.Start And Selection.End < r.End Then _
MsgBox "cursor is in range."

Larry
 
J

Jean-Guy Marcil

Hi Larry,

Try this:

'_______________________________________
If Selection.Information(wdInEndnote) Then
MsgBox "The cursor is in the end note pane!"
Else
MsgBox "The cursor is NOT in the end note pane!"
End If
'_______________________________________

--
Cheers!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site: http://www.word.mvps.org
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top