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 2007

Tip: Looking for answers? Try searching our database.

Return from viewing bookmark

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
roccogrand - 15 Jun 2007 22:49 GMT
I have a short glossary of abbreviations in a document.  Each item is defined
as a bookmark.  

I want to place hyperlinks throughout the document that will take readers to
the item on the glossary page.  

How can I create a button for each glossary item that will take the reader
back to where he/she invoked the hyperlink?  

Thanks.
Helmut Weber - 16 Jun 2007 01:06 GMT
Hi roccogrand,

if it is just for you and not for an end-user,
i'd add two buttons:
HyperlinkOpen,
MyGoback.

In Options, you have to set
Options.CtrlClickHyperlinkToOpen = True,
or in the macro i my example,
for several reason. Can't explain all.

So you put the cursor in the hyperlink.
Execute HyperlinkOpen.
Leads you to the hyperlink.

Do something. Except deleting the bookmark
which was created by HyperlinkOpen.

Click MyGoback.

Sub HyperlinkOpen()
Options.CtrlClickHyperlinkToOpen = True
Selection.Bookmarks.Add "Goback"
Selection.Hyperlinks(1).Follow
End Sub

Sub MyGoBack()
ActiveDocument.Bookmarks("Goback").Select
ActiveDocument.Bookmarks("Goback").Delete
End Sub

HTH

Signature

Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"

HTH

>I have a short glossary of abbreviations in a document.  Each item is defined
>as a bookmark.  
[quoted text clipped - 6 lines]
>
>Thanks.
 
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.