Word - Bookmarks 
Author Message
 Word - Bookmarks

Hi
Situation:
A lot of bookmarks in a document...:
pkt_1
end_1
pkt_2
  <myCursor>
end_2
pkt_3
end_3
....

Is there a easy way to tell which two bookmarks is around the actual
position of the cursor and / or which bookmark is the nearest over the
actual cursor position.



Sun, 14 Sep 2003 07:26:59 GMT  
 Word - Bookmarks
Hi Tommy,

Quote:
> Is there a easy way to tell which two bookmarks is around the actual
> position of the cursor and / or which bookmark is the nearest over the
> actual cursor position.

Can't think of any easy way, no. But...

You can get the bookmarks in the order they appear in the document by
using the .Bookmarks property of the RANGE (rather than Document)
object. Then you can get the .Start or .End value for the bookmark range
and compare it to that of the current selection.

This may not be fool-proof, however, given some of the odd behavior of
ranges when there's hidden stuff, fields, etc. in a document. Might be
good enough for your purposes.

Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister
http://www.mvps.org/word
http://go.compuserve.com/MSOfficeForum

This reply is posted in the Newsgroup; please post any follow question
or reply in the newsgroup and not by e-mail :-)



Sat, 27 Sep 2003 00:08:56 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. Import Data from word bookmarks using sql?

2. Go to Word Bookmark

3. WORD bookmark not printing VB text only on some PC's

4. Updating word bookmarks

5. Please help with text box to Word bookmark problem

6. Word Bookmarks, Userforms and Updates

7. word bookmarks

8. Word Bookmarks

9. word bookmarks

10. Please help with text box to word bookmark

11. Converting Word BookMarks to PDF Files

12. copy an excel chart to word bookmark in vb

 

 
Powered by phpBB® Forum Software