I did not have the Web toolbar in mind until Suzanne mentioned it. I have now
tried to test whether I could find a clear relationship between the _Hlt
bookmarks and the Back (Alt+Left Arrow) and Forward (Alt+Right Arrow)
commands on the Web toolbar.
Actually, the Back command _always_ seems to go back to the latest _Hlt
bookmarked location if Back is executed immediately after clicking a
hyperlink (the GoBack (Shift+F5) does _not always_ do the same)). And if you
select Back and Forward multiple times, they also seem to find the _Hlt
bookmarked places.
I have also noticed that a new _Hlt bookmark is added each time you select
Back or Forward. These _Hlt bookmarks are added to the position you click
regardless of whether it is a hyperlink or not. Also, Back and Forward seems
to be disabled until the first time you have followed a hyperlink in a
document.
So there absolutely seems to be a relationship between the _Hlt bookmarks
and the Back and Forward commands.
Further observations:
If you update all fields in a document, all the _Hlt bookmarks in the fields
are deleted which seems obvious since the fields are actually replaced by the
update (this also explains why the list of _Hlt bookmarks does not continue
to grow). _Hlt bookmarks outside fields will remain.
But the mystery is not solved yet:
If _all_ the _Hlt bookmarks are gone (due to field update or manual
deletion), and if the Back and Forward commands need the _Hlt bookmarks, the
Back and Forward commands should again be disabled until you have followed at
least one hyperlink. But the commands are not disabled! Most often (but not
consistently) the commands seem to be able to go to at least some previously
_Hlt bookmarked locations anyway.
So maybe the _Hlt bookmarks are just (or partly) reminiscence from the time
before the Back and Forward commands on the Web toolbar were introduced?
-------------------------
Some facts about the Back and Forward buttons on the Web toolbar:
The “Back†button executes the command “WebGoBackâ€
The “Forward†button executes the command “WebGoForwardâ€
To find the commands, select Tools > Customize. In the Categories list,
select All Commands. The commands can now be found in the Commands list.
During my check of commands I also found a built-in command named
“GotoTableOfContentsâ€. The command selects the entire TOC (it only checks for
the first TOC in a document and it shows a message if no TOC is found). The
command seems to be an old WordBasic command - so even if I have only had the
chance to test the command in Word 2003, I think it will be found in several
older versions. When added to a toolbar, the command appears as an icon with
a page and an arrow pointing upwards.
--------------------------
Below you will find a macro that adds the Back, Forward and
GotoTableOfContents commands to the _start_ of the Standard toolbar and saves
the changes to Normal.dot (change the value of “Before†to add the commands
in another position on the toolbar):
Sub AddGotoButtonsToStandardToolbar()
CustomizationContext = NormalTemplate
'ID 6114 = GotoTableOfContents
'ID 1018 = WebGoForward
'ID 1017 = WebGoBack
With CommandBars("Standard").Controls
.Add msoControlButton, ID:=6114, Before:=1
.Add msoControlButton, ID:=1018, Before:=1
.Add msoControlButton, ID:=1017, Before:=1
End With
NormalTemplate.Save
End Sub
--------------------------
If you want the GotoTableOfContents command to _position the insertion point
in the start of the TOC_ instead of selecting the entire TOC, you may copy
the following macro to your Normal.dot. If you keep the macro name unchanged,
the macro will run instead of the built-in Goto-TableOfContents command.
Sub GotoTableOfContents()
‘First exectue the built in GotoTableOfContents command
WordBasic.GotoTableOfContents
'Then collapse the selection in start of TOC
Selection.Collapse (wdCollapseStart)
End Sub
--
Regards
Lene Fredborg
DocTools – Denmark
www.thedoctools.com
Document automation – add-ins, macros and templates for Microsoft Word