Autoexec macro

W

Wayne Erfling

How do I create an "Autoexec" macro in Visio, to be run whenever Visio
starts (not just when I open a particular document)?

Visio has the same "Reviewing Toolbar" problem as the other MS Office
applications (Reviewing toolbar displays whenever you start up MS Word or
Excel or Visio, no matter how many times you turn it off).

This works in MS Word:

'Add the following routine to the normal.dot file

Sub AutoExec()
'
' AutoExec Macro
' Macro created 4/21/2005 by Wayne Erfling
'

With Application.CommandBars("Reviewing")
.Visible = False
End With

End Sub

....and this works in Visio, but I don't know how to make it run when I start Visio.

Do I save a Visio document to the "startup" folder? Is there an equivalent of the "normal.dot" file is in Visio?

Or a .vsi file? I've found references to .vsi but no detailed information.
 
M

Michel LAPLANE

Very strange because with my version Visio display only the toolbar that were visible on the last time he was closed.

Perhaps you have no rights on the registry for security reason in you company. The modification are stored in the HKCU/software/microsoft/office/11.0/visio/toolbars/state
"Wayne Erfling" <[email protected]> a écrit dans le message de [email protected]...
How do I create an "Autoexec" macro in Visio, to be run whenever Visio
starts (not just when I open a particular document)?

Visio has the same "Reviewing Toolbar" problem as the other MS Office
applications (Reviewing toolbar displays whenever you start up MS Word or
Excel or Visio, no matter how many times you turn it off).

This works in MS Word:

'Add the following routine to the normal.dot file

Sub AutoExec()
'
' AutoExec Macro
' Macro created 4/21/2005 by Wayne Erfling
'

With Application.CommandBars("Reviewing")
.Visible = False
End With

End Sub

...and this works in Visio, but I don't know how to make it run when I start Visio.

Do I save a Visio document to the "startup" folder? Is there an equivalent of the "normal.dot" file is in Visio?

Or a .vsi file? I've found references to .vsi but no detailed information.
 
W

Wayne Erfling

Implementing a startup macro is the more general solution to this problem.

I am still seeking to learn how to run a Visio macro when the program starts.

The "Viewing" toolbar problem is fairly well known. For some of the MS Office programs apparently it has to do with document history - you won't see Reviewing until you do some markup and then you have to know exactly what to do to get rid of it, either for that document or for the program as a whole. I guess the author of this particular stupid idea wanted to be sure the user couldn't possibly forget about the Viewing toolbar.

I prefer the more general solution that is working well for me in Excel and MS Word; just a little fix or six line macro that runs when the program starts. This way I don't need to get into the details of possibly more than one document and learn how to expunge the fact that I once did a markup in one document (or whatever makes it happen).

---Wayne

Very strange because with my version Visio display only the toolbar that were visible on the last time he was closed.

Perhaps you have no rights on the registry for security reason in you company. The modification are stored in the HKCU/software/microsoft/office/11.0/visio/toolbars/state
"Wayne Erfling" <[email protected]> a écrit dans le message de [email protected]...
How do I create an "Autoexec" macro in Visio, to be run whenever Visio
starts (not just when I open a particular document)?

Visio has the same "Reviewing Toolbar" problem as the other MS Office
applications (Reviewing toolbar displays whenever you start up MS Word or
Excel or Visio, no matter how many times you turn it off).

This works in MS Word:

'Add the following routine to the normal.dot file

Sub AutoExec()
'
' AutoExec Macro
' Macro created 4/21/2005 by Wayne Erfling
'

With Application.CommandBars("Reviewing")
.Visible = False
End With

End Sub

...and this works in Visio, but I don't know how to make it run when I start Visio.

Do I save a Visio document to the "startup" folder? Is there an equivalent of the "normal.dot" file is in Visio?

Or a .vsi file? I've found references to .vsi but no detailed information.
 
M

Mark Nelson [MS]

First, here are the typical steps to get rid of the Reviewing toolbar for a document. From the Reviewing toolbar, deselect each active toolbar button. Typically, you must turn off Show/ Hide Markup on the left end and Track Markup and Reviewing Pane on the right end. Then close the Reviewing toolbar and save the document. Then exit Visio. Unfortunately this is done on a document-by-document basis, but the change should stick for that document. I agree that the design is frustrating, and it is likely that Visio just copied the behavior of other Office applications blindly.

Second, Visio does not have an Autoexec function. You can add a VBA project to a document and put a macro in the DocumentOpened event to run code for a specific document. If you want to create an application that runs when Visio launches, you need to build a COM Add-In.

--
Mark Nelson
Office Graphics - Visio
Microsoft Corporation

This posting is provided "AS IS" with no warranties, and confers no rights.

Implementing a startup macro is the more general solution to this problem.

I am still seeking to learn how to run a Visio macro when the program starts.

The "Viewing" toolbar problem is fairly well known. For some of the MS Office programs apparently it has to do with document history - you won't see Reviewing until you do some markup and then you have to know exactly what to do to get rid of it, either for that document or for the program as a whole. I guess the author of this particular stupid idea wanted to be sure the user couldn't possibly forget about the Viewing toolbar.

I prefer the more general solution that is working well for me in Excel and MS Word; just a little fix or six line macro that runs when the program starts. This way I don't need to get into the details of possibly more than one document and learn how to expunge the fact that I once did a markup in one document (or whatever makes it happen).

---Wayne

Very strange because with my version Visio display only the toolbar that were visible on the last time he was closed.

Perhaps you have no rights on the registry for security reason in you company. The modification are stored in the HKCU/software/microsoft/office/11.0/visio/toolbars/state
"Wayne Erfling" <[email protected]> a écrit dans le message de [email protected]...
How do I create an "Autoexec" macro in Visio, to be run whenever Visio
starts (not just when I open a particular document)?

Visio has the same "Reviewing Toolbar" problem as the other MS Office
applications (Reviewing toolbar displays whenever you start up MS Word or
Excel or Visio, no matter how many times you turn it off).

This works in MS Word:

'Add the following routine to the normal.dot file

Sub AutoExec()
'
' AutoExec Macro
' Macro created 4/21/2005 by Wayne Erfling
'

With Application.CommandBars("Reviewing")
.Visible = False
End With

End Sub

...and this works in Visio, but I don't know how to make it run when I start Visio.

Do I save a Visio document to the "startup" folder? Is there an equivalent of the "normal.dot" file is in Visio?

Or a .vsi file? I've found references to .vsi but no detailed information.
 

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