Opening and Saving Visio Documents

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.

Components of a Visio Document

Each Visio document always has the following elements:

  • At least one drawing page
  • A document stencil that contains copies of any masters used on the drawing page (or, in the case of a .vss or .vsx file, a named stencil that displays the masters)
  • A workspace list, which identifies all of the windows and files that are opened with the current file.
  • A list of styles defined in the document, including at least the four default Visio styles (No Style, None, Normal, and Text Only)
  • A color palette of 24 user-modifiable color slots and, beginning with Visio 2002, any number of additional colors defined by RGB (red, green, blue) or HSL (hue, saturation, luminosity) formulas in the document
  • A Microsoft Visual Basic for Applications (VBA) project with a default (empty) class module called ThisDocument.
  • A document sheet that can store user-defined data.

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.

Opening a Visio File

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:

  • To display the document stencil for a file, on the File menu, point to Stencils, and then click Document Stencil.
  • To display the drawing window for a stencil file, click Show Drawing Page on the Window menu. This option is available only when a stencil has been opened as stand-alone and no drawing window is open.

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.

Choosing the Right File Type for Your Solution

You can take advantage of the different Visio file types to work more efficiently. Here are some tips for saving your work:

  • Save a file's document stencil as a stencil file (.vss, or .vsx for a stencil in XML format) to create a new stand-alone stencil of frequently used shapes.
  • To save a drawing with its current workspace view (so that the same windows appear in the same location when you reopen the file), use the Workspace option (click the arrow next to the Save button) in the Save As dialog box.
  • 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.

  • If you're saving stencil and template files that are meant to work together, make sure that their drawing page settings, styles, and colors are compatible. For details, see Chapter 10, Managing Styles, Formats, and Colors.
  • If you're working on a document that you want others to review but not change, save the file as read-only. To do this, in the Save As dialog box, click the arrow next to the Save button, and then click Read only.

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).



Developing Microsoft Visio Solutions 2001
Developing Microsoft Visio Solutions (Pro-Documentation)
ISBN: 0735613532
EAN: 2147483647
Year: 2004
Pages: 180

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net