Showing the Document Map

W

Ward

Hi,

With the help of a Global Template (Main.dot), I start the creation of
a document (based on Report.dot).
After the document is finished i want the readers automatically have
the "Document Map" visible.

The document is distributed in a large organisation, and at home of the
readers (students). My problem rises when the connection to the
Report.dot is broken.

How do i add to the document:
ActiveDocument.ActiveWindow.DocumentMap = True
Or is there a better solution?

Thank you for your time.

Ward
 
W

Word Heretic

G'day "Ward" <[email protected]>,

Give it a Document_Open event that has that one line.


Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Ward reckoned:
 
W

Ward

G'day Steve,

Thank you for your reaction,

My problem was: how to get the macro in the document in stread of the
template.
Finaly i created a module named modAutoExec.bat, and placed it on the server.

In the Main.dot i create the document and import the macro:
Set docNew = Documents.Add(Template:="Report.dot")
docNew .VBProject.VBComponents.Import FileName:= "modAutoExec.bas"

the module looks like:
Public Sub AutoOpen()
ActiveDocument.ActiveWindow.DocumentMap = True
End Sub
Public Sub AutoClose()
ActiveDocument.ActiveWindow.DocumentMap = False
End Sub

Thanks mate :)

Ward
 
W

Word Heretic

G'day "Ward" <[email protected]>,

An easier way is to include a separate Code Module in your main
template that you copy over into This_Document.

Steve Hudson - Word Heretic

steve from wordheretic.com (Email replies require payment)
Without prejudice


Ward reckoned:
 

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