Which Footnote is the Selection in?

M

mccaskey

The Selection is in a footnote. I need the Range for that whole
Footnote.

Is there a straightforward way or do I need to scan all footnotes
comparing start/end values till I find the one the Selection is in?
 
J

Jay Freedman

The Selection is in a footnote. I need the Range for that whole
Footnote.

Is there a straightforward way or do I need to scan all footnotes
comparing start/end values till I find the one the Selection is in?

The range you want is just Selection.Footnotes(1).Range.

To verify, temporarily put this line in your macro at the point where
you want to use the range:

MsgBox Selection.Footnotes(1).Range.Text

You should see the content of the entire footnote that contains the
Selection, displayed in the message box.

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
M

mccaskey

The range you want is just Selection.Footnotes(1).Range.

To verify, temporarily put this line in your macro at the point where
you want to use the range:

MsgBox Selection.Footnotes(1).Range.Text

You should see the content of the entire footnote that contains the
Selection, displayed in the message box.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ:http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.

I was hoping it was straightforward. Thanks Jay!
 

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