3 4
All Microsoft Visio files have the same format. However, a Visio document's file name extension determines how you open it and how you save any changes you make. A Visio document can be saved in binary or XML format and can be a drawing ( . vsd or .vdx), stencil ( . vss or. vsx), or template ( . vst or .vtx). The Visio engine uses the file name extension to determine what to display on the screen when the document is opened. This means, for example, that you can save a drawing file ( . vsd or .vdx) as a template ( . vst or .vtx), which you can then open and work with as a template.
Each Visio document always has the following elements:
A document can also contain shapes on the drawing page, with styles and colors applied from those stored in the document, as well as a VBA project with modules, class modules, and user forms.
For details about defining custom colors in Visio, see Using a Formula to Define a Custom Color in Chapter 10, Managing Styles, Formats, and Colors.
For details about using VBA in Microsoft Visio, see Chapter 15, Programming Visio with VBA.
You can open a Visio file with read/write access, with read-only access, or as a copy of the original document. When you click Open on the File menu, these options appear in a list under the Open button in the Open dialog box.
The Visio engine uses a document's file name extension to determine which windows should be active. For example, when you open a stencil file, only its document stencil is displayed. When you open a drawing file, only the drawing page is displayed. You can display the windows that aren't displayed by default for a Visio file:
The following table describes how items appear by default for each file name extension when opened.
Default contents of different file types
File type | Document type | Contents |
.vsd (binary format), .vdx (XML format) | Drawing | Opens all windows and files listed in the workspace, if the workspace was saved with the file. If not, Visio creates a drawing window and displays the page that was open the last time the file was saved. |
. vss (binary format) .vsx (XML format) | Stencil | Opens the stencil as read-only (in a docked, anchored window, if a drawing window is active). If a drawing window is not active, Visio creates a stencil window and displays the file's stencil. |
.vst (binary format) .vtx (XML format) | Template | Opens an untitled copy of the drawing in a drawing window, and opens all windows and files listed in the workspace list. |
You can take advantage of the different Visio file types to work more efficiently. Here are some tips for saving your work:
To save your file and its workspace, on the File menu, click Save As. In the Save As dialog box, click the arrow next to the Save button, and then click Workspace. Type a name for the file, choose the folder to save it in, and then click Save.
Users can open and edit a copy of a read-only file, but cannot edit the original. After you have saved a file as read-only, to make the file editable again, use the Save As command to save the file to another name.
For details on how to save different types of files, see the Microsoft Visio Help (on the Help menu, click Microsoft Visio Help).