Footnotes & Range

F

Fede

Hi everybody,
I have a problem with footnotes.
How can I know if the current selection is inside the footnotes' area or is
inside the document?

I've tried with

If Selection.Range.Footnotes.Count<>0 then
' I'm inside the footnotes' area
End if

but it's incorrect. In fact Selection.Range.Footnotes.Count<>0 also when
Selection.Range contains a reference of a footnote.

Hoew can I do?
Thanks in advance.
Fede
 
C

Chuck

Use Selection.Range.Information for a lot of this kind of testing, eg:

If Selection.Range.Information(wdInFootnote) = True Then
'you're in a footnote
End If

For more info look in at VBE help for Information Property.
 
F

Fede

Chuck said:
Use Selection.Range.Information for a lot of this kind of testing, eg:

If Selection.Range.Information(wdInFootnote) = True Then
'you're in a footnote
End If

For more info look in at VBE help for Information Property.


That works very well!
Thank you very much,Chuck.
Fede
 

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