Showing document structure

P

Pablo Cardellino

Hi,

would it be possible to show the document structure by clicking on a
link, without a macro? I'd like to include a clickable "Show the
document structure" text instead of adding a shortcut or a toolbar with
the respective button to the document and explaining "press ctr+alt+s
[or whatever] / click on the button [button icon] for showing the
document structure"

Thanks,
 
D

David Horowitz

Pablo,
I'm not entirely sure I understand what you're asking with regards to
"showing the document structure", however if you're looking for a way to
include some clickable text in the document that can run a macro instead of
using a toolbar button, menu command, or shortcut key combination, you can
use the MACROBUTTON field.
You can either use Insert > Field, then go to MACROBUTTON, or you can press
CTRL-F9, then type the MACROBUTTON field codes. Then you can toggle the
display of the field code away by pressing SHIFT-F9.
So for example, you could put your cursor in the document where you want the
clickable text, then hit CTRL-F9, then type
MACROBUTTON MacroName Double-click here to do it
All that text should appear within curly braces, like this:
{ MACROBUTTON MacroName Double-click here to do it }
but you can't type the curly braces - they appear when you hit CTRL-F9.
Now you can hit SHIFT-F9 to toggle to showing the field result instead of
the code.
Now if you try double-clicking on that text, it will try to run the macro
called MacroName. Of course, you should change that to whatever the
appropriate macro name is in your case.
Hope this helps...
 
P

Pablo Cardellino

David Horowitz escribió:
Pablo,
I'm not entirely sure I understand what you're asking with regards to
"showing the document structure", however if you're looking for a way to
include some clickable text in the document that can run a macro instead of
using a toolbar button, menu command, or shortcut key combination, you can
use the MACROBUTTON field.
You can either use Insert > Field, then go to MACROBUTTON, or you can press
CTRL-F9, then type the MACROBUTTON field codes. Then you can toggle the
display of the field code away by pressing SHIFT-F9.
So for example, you could put your cursor in the document where you want the
clickable text, then hit CTRL-F9, then type
MACROBUTTON MacroName Double-click here to do it
All that text should appear within curly braces, like this:
{ MACROBUTTON MacroName Double-click here to do it }
but you can't type the curly braces - they appear when you hit CTRL-F9.
Now you can hit SHIFT-F9 to toggle to showing the field result instead of
the code.
Now if you try double-clicking on that text, it will try to run the macro
called MacroName. Of course, you should change that to whatever the
appropriate macro name is in your case.
Hope this helps...

Hi, David,

There's is a command in Word that shows the document structure. I don't
really know how is it called in English, but it must not be anything too
different from "view document structure", and it's accessible through
View menu. When it's activated, the list of titles of the document is
showed in a tree structure at the left of the window.

Since this is a native feature, I didn't want to use any VBA: I'd like
to put "something clickable", such as a button or a link, that would
activate this feature.

Is it possible, or just through VBA?

Thanks,
 
G

Greg

It is called "Document Map" and as you say it is on the View menu. No, you
can't but a clickable field in the document that runs that command without
using a macrobutton field as David describes.

You can however add that command to the main menu bar and edit its
description to read whatever you like. Right an unused area of the menu,
select customize, commands, view. Click Document Map and drag and drop it on
the menu bar. Right click it and edit it to suit your needs.
 
J

Jay Freedman

David Horowitz escribió:

Hi, David,

There's is a command in Word that shows the document structure. I don't
really know how is it called in English, but it must not be anything too
different from "view document structure", and it's accessible through
View menu. When it's activated, the list of titles of the document is
showed in a tree structure at the left of the window.

Since this is a native feature, I didn't want to use any VBA: I'd like
to put "something clickable", such as a button or a link, that would
activate this feature.

Is it possible, or just through VBA?

Thanks,

Hi Pablo,

In the English versions of Word that is called the Document Map. Although that
command doesn't have a toolbar button or a keyboard shortcut by default, you can
assign them through the Customize and Keyboard dialogs. It's in the View
category, and (at least in English) the command name is ShowDocumentMap.
 
P

Pablo Cardellino

David Horowitz escribió:
Pablo,
I'm not entirely sure I understand what you're asking with regards to
"showing the document structure", however if you're looking for a way to
include some clickable text in the document that can run a macro instead of
using a toolbar button, menu command, or shortcut key combination, you can
use the MACROBUTTON field.
You can either use Insert > Field, then go to MACROBUTTON, or you can press
CTRL-F9, then type the MACROBUTTON field codes. Then you can toggle the
display of the field code away by pressing SHIFT-F9.
So for example, you could put your cursor in the document where you want the
clickable text, then hit CTRL-F9, then type
MACROBUTTON MacroName Double-click here to do it
All that text should appear within curly braces, like this:
{ MACROBUTTON MacroName Double-click here to do it }
but you can't type the curly braces - they appear when you hit CTRL-F9.
Now you can hit SHIFT-F9 to toggle to showing the field result instead of
the code.
Now if you try double-clicking on that text, it will try to run the macro
called MacroName. Of course, you should change that to whatever the
appropriate macro name is in your case.
Hope this helps...


Hi, David,

now I understood what you suggested, and it works fine
Thanks!

Regards,
 
P

Pablo Cardellino

Jay Freedman escribió:
Hi Pablo,

In the English versions of Word that is called the Document Map. Although that
command doesn't have a toolbar button or a keyboard shortcut by default, you can
assign them through the Customize and Keyboard dialogs. It's in the View
category, and (at least in English) the command name is ShowDocumentMap.

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

Hi, Jay,
thanks for the information,
best regards,
 

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