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 / June 2005

Tip: Looking for answers? Try searching our database.

Can I highlight the subject of a bookmark?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Questions?? - 28 Jun 2005 17:28 GMT
I was wondering if there is a way to enhance a bookmark, so that in addition
to jumping to the specific section chosen, the information contained in that
section would also be highlighted (i.e. the other areas dim, or the selected
area is marked in a fluorescent color)?  I'm making a web page with a word
document and I think it might be helpful for my webpage viewers to see
exactly what I'm referring to, since otherwise they would have to know that
bookmarks always put info at the top of the page.
Helmut Weber - 28 Jun 2005 19:43 GMT
Hi,

hmm...

highlight a bookmark?

Well, if the bookmark "M1" looks like [bookmark], then

ActiveDocument.Bookmarks("M1").Range.HighlightColorIndex = wdYellow

Or am I missing the point?

HTH

Greetings from Bavaria, Germany

Helmut Weber, MVP, WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
Questions?? - 29 Jun 2005 15:21 GMT
Do I need to use the script editor?  If so here is what I get:
<a href="#Bookmark_Location_Example">  
Thanks for your help!

> Hi,
>
[quoted text clipped - 16 lines]
> Win XP, Office 2003
> "red.sys" & Chr$(64) & "t-online.de"
Helmut Weber - 29 Jun 2005 16:17 GMT
Hi

>Do I need to use the script editor?

Probably very much so.
One could use a winwdowselectionchange-event.
See:
http://word.mvps.org/faqs/macrosvba/AppClassEvents.htm

and highlight the bookmark in the selection automatically
plus removing highlighting from all other bookmarks.

One could intercept the command Hyperlink.follow, I think.
If I only knew what the name of that command was!

Interesting question, maybe somebody else will jump in.
And a big challenge for someone, who asks, whether
the use of the script editor (better VBAIDE) would be necessary.

Greetings from Bavaria, Germany

Helmut Weber, MVP, WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
 
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.