Visio Guy

Archives => Visio 2010 Feature Requests [Read Only] => Topic started by: AndyW on October 07, 2008, 07:01:53 AM

Title: Command line option to reset the Visio toolbars etc.
Post by: AndyW on October 07, 2008, 07:01:53 AM
My application hides the lots of the Visio toolbars etc. Any settings that I change, I attempt to reset when my application exits. However, if for any reason my application exits without tidying up the users can be left with Visio showing no toolbars. I created another Visio application that can be run to reset these.

What would be useful is a command line option that can be used to set everything back to the original settings. Better still would be for an application to be able to change these settings temporarily.
Title: Re: Command line option to reset the Visio toolbars etc.
Post by: Paul Herber on October 07, 2008, 12:28:56 PM
Quote from: AndyW on October 07, 2008, 07:01:53 AM
I created another Visio application that can be run to reset these.

That would be a very useful utility, something that can reset all menus, toolbars, windows etc. back to their default locations.


Title: Re: Command line option to reset the Visio toolbars etc.
Post by: Nikolay on February 19, 2009, 07:28:48 AM
Not only to default, but it would be really great if one could remove
a specific menu/toolbar with this utility from command line
This would fix my uninstall issue here (http://visguy.com/vgforum/index.php?topic=701.0) for exmaple... ::)
Title: Re: Command line option to reset the Visio toolbars etc.
Post by: Barry on June 30, 2009, 05:59:38 AM
Customizations involving controls (add,remove,rename,etc) are stored in a file underneath your profile folder.  One workaround is to shutdown Visio  and then delete  custom*.vsu file (e.g. on Vista this is at C:\Users\<username>\AppData\Roaming\Microsoft\Visio\custom12.vsu).  The version is encoded in the filename, so delete custom*.vsu to cover all bases.

Customizations involving toolbar visibility and positioning are stored in the registry: HKEY_CURRENT_USER\Software\Microsoft\Office\<version>\Visio\Toolbars\State.   Each toolbar has a unique registry value underneath this key.  You can delete these values individually to restore the toolbar visibility/positioning to the default.

Barry
Title: Re: Command line option to reset the Visio toolbars etc.
Post by: Visio Guy on June 30, 2009, 07:42:55 AM
You can type these two lines into the Immediate window of the VBA editor:


Visio.Application.ClearCustomMenus
Visio.Application.ClearCustomToolbars


That might help a little bit.

Also, there is another thread with a related topic and some code-snippets. You might be able to modify that code a little bit. See:

  Hide ALL toolbars code snippet (http://visguy.com/vgforum/index.php?topic=289.0)