GoToTOC

P

Phil H

Need a macro I can attach to a toolbar button that will take me to the Table
of Contents of a document. Any help would be appreciated.
 
J

Jay Freedman

You don't need a macro, since there's a built-in command that already
does this. The command shows up in the Customize Keyboard dialog (for
assigning a shortcut key) as GotoTableOfContents. In Word 2007 it can
be assigned to the Quick Access Toolbar as the Go To TOC command in
the All Commands category. I don't have Word 2003 handy to see what
it's called in the Tools > Customize > Commands dialog, but it will be
there.

If you really want a completely superfluous macro, use

Sub x()
WordBasic.GotoTableOfContents
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.
 
P

Phil H

Thanks for the help, Jay.

Jay Freedman said:
You don't need a macro, since there's a built-in command that already
does this. The command shows up in the Customize Keyboard dialog (for
assigning a shortcut key) as GotoTableOfContents. In Word 2007 it can
be assigned to the Quick Access Toolbar as the Go To TOC command in
the All Commands category. I don't have Word 2003 handy to see what
it's called in the Tools > Customize > Commands dialog, but it will be
there.

If you really want a completely superfluous macro, use

Sub x()
WordBasic.GotoTableOfContents
End Sub

--
Regards,
Jay Freedman
Microsoft Word MVP
Email cannot be acknowledged; please post all follow-ups to the
newsgroup so all may benefit.



.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top