Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / February 2005

Tip: Looking for answers? Try searching our database.

How to find out whether a selection or range contains any bookmark

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Reinhart Vollmer - 23 Feb 2005 18:32 GMT
Hi,

I have to find out whether there is a bookmark within a certain
selection or range of my word document and - if there is a bookmark in
the selection/range - which name it has.

I could iterate the bookmarks-list and check each and every bookmark.
But that's seems far too much trouble. Is there a simple way to find out
 a bookmark within a selection/range?

Thanks for any idea!

Reinhart.
Jezebel - 23 Feb 2005 19:38 GMT
Dim pBookMark as Word.Bookmark
For each pBookMark in Selection.Bookmarks
   ...

> Hi,
>
[quoted text clipped - 9 lines]
>
> Reinhart.
Reinhart Vollmer - 24 Feb 2005 18:41 GMT
Thank you so much,

but I found a solution myself in the meantime, that is (Delphi-Code for Word 97, 2000, 2002):

    i := WordApplication.Selection.BookmarkID;
    if i > 0 then
        begin
        sName := WordApplication.Activedocument.Bookmarks.Item(i).Name;
        ...
        end;

Thanks again,
    Reinhart.

Jezebel schrieb:

> Dim pBookMark as Word.Bookmark
> For each pBookMark in Selection.Bookmarks
[quoted text clipped - 13 lines]
>>
>>Reinhart.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.