Chapter 22, Customizing the Visio User Interface

Chapter 22, Customizing the Visio User Interface

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

You can customize the Microsoft® Visio® user interface (UI) to make running your program easier or to simplify Visio for your users. For example, you might add a custom toolbar button or menu item that runs your solution, or remove tools and menu commands that you want to make unavailable while your solution is running.

This chapter discusses how to customize the Visio user interface from a program by accessing CommandBar objects or UIObject objects, or through a custom Visio user interface (VSU) file. For details about using the Customize command, see the Microsoft Visio Help.

You can modify the Visio user interface in any of the following ways:

  • Use the Customize command (on the Tools menu, click Customize. Or, on the View menu, point to Toolbars, and then click Customize). Users can modify the user interface in this way, too, if they have access to the Customize command.
  • Include code in your solution that accesses the Microsoft Office CommandBar objects.
  • Include code in your solution that accesses the Visio UIObject objects.
  • Create a VSU file that contains only menu and toolbar items specific to your solution and load this file each time your solution runs. A VSU file is a snapshot of your custom user interface, containing your custom user interface data. To make extensive changes to the Visio user interface, you can code your custom user interface changes in an external development environment and save a custom user interface file.

Tip If your solution is an external program that uses the Visio engine as a component (as opposed to an add-on that runs within a Visio instance), you might want to conceal more than just the Visio menus and toolbars from your users. You can hide the Visio instance completely by setting the Application.Visible property to False. Window objects also have the Visible property, so you can hide just a window if necessary. For details about the Visible property, search the Microsoft Visio Developer Reference (on the Help menu, click Developer Reference).

In this chapter...

Using CommandBar Objects to Customize the Visio User Interface

Using Visio UIObject Objects to Customize the Visio User Interface

Using Custom User Interface Files