Author Topic: Command line option to reset the Visio toolbars etc.  (Read 11809 times)

0 Members and 1 Guest are viewing this topic.

AndyW

  • Sr. Member
  • ****
  • Posts: 320
    • PC Mimic Diagram
Command line option to reset the Visio toolbars etc.
« on: October 07, 2008, 02: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.
Live life with an open mind

Paul Herber

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2932
    • Paul Herber's website
Re: Command line option to reset the Visio toolbars etc.
« Reply #1 on: October 07, 2008, 07:28:56 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.


Electronic and Electrical engineering, business and software stencils and applications for Visio -

https://www.paulherber.co.uk/

Nikolay

  • Hero Member
  • *****
  • Posts: 945
    • UnmanagedVisio
Re: Command line option to reset the Visio toolbars etc.
« Reply #2 on: February 19, 2009, 02: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 for exmaple... ::)

Barry

  • Jr. Member
  • **
  • Posts: 18
Re: Command line option to reset the Visio toolbars etc.
« Reply #3 on: June 30, 2009, 12: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

Visio Guy

  • Administrator
  • Hero Member
  • *****
  • Posts: 1716
  • Smart Graphics for Visual People...n' Stuff
    • Visio Guy
Re: Command line option to reset the Visio toolbars etc.
« Reply #4 on: June 30, 2009, 02:42:55 AM »
You can type these two lines into the Immediate window of the VBA editor:

Code
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

For articles, tips and free content, see the Visio Guy Website at http://www.visguy.com
Get my Visio Book! Using Microsoft Visio 2010