The code you are looking for is:
ActiveWindow.DocumentMap = True
However since this option is specific to the application, rather than
a document, if you turn the Document Map on it should stay on and if
you turn it off it should stay off.
If you are trying to create a macro for other users that forces the
display of the Document Map then I personally wouldn't recommend it -
nor would I inflict this type of pain on other users <grin>.
Well...not without making it a point to preserve the user's
preferences, anyway.
Users are particular when it comes to their settings. If you create a
macro that changes *my* preferences then I'll hunt you down and tell
you what I think about you taking such liberties. ;-) And there's also
the aspect that the user may not know how to turn the Document Map
off. Then they end up coming here and asking us.
To prevent either of the above from happening then what you need to do
is create a Document_Open macro that first stores the user's current
view of the Document Map in a variable and then turns on the Document
Map. Then use a Document_Close macro to set the view of the Document
Map back to that of the value of the variable.
If you aren't familiar with how to create the macros I described then
the best group for macro questions is one of the Word VBA newsgroups.
Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.
~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP
Word FAQ:
http://mvps.org/word
TechTrax eZine:
http://mousetrax.com/techtrax/
MVP FAQ site:
http://mvps.org/