Microsoft Office Online
Sign in to My Office Online (What's this?) | Sign in

 
 
Microsoft Office Visio
Search
Search
 
Check for updates: (c) Microsoft
Office downloads
 
 
 
Warning: You are viewing this page with an unsupported Web browser. This Web site works best with Microsoft Internet Explorer 6.0 or later, Firefox 1.5, or Netscape Navigator 8.0 or later. Learn more about supported browsers.

Email this linkEmail this link Printer-Friendly VersionPrinter-Friendly Version Bookmark and ShareShare
Using Visio diagrams with other Microsoft Office programs
 
Applies to
Microsoft Office Visio® 2003
Inside Out Visio 2003 Image This article was excerpted from Microsoft® Office Visio® 2003 Inside Out by Mark H. Walker and Nanette Eaton, Chapter 7, "Using Visio Diagrams with Other Programs." Visit Microsoft Learning to buy this book.

In this article

Introduction

Working with OLE

Linking a Visio diagram to an Office document

Editing a linked diagram

Updating a linked diagram

Embedding a Visio diagram in an Office document

Embedding an entire Visio diagram

Troubleshooting

Introduction

Perhaps that report you're creating in Microsoft Office Word 2003 or the e-mail message you're composing would be clearer if you included a Microsoft Office Visio 2003 flowchart of the process. Maybe you want to display your organization chart on a Microsoft Office PowerPoint 2003 slide. In most organizations, people create and share information in a number of different applications, and Visio is one of many desktop programs. Visio is designed to work with other applications. Diagrams and shapes can be displayed in other documents in a variety of ways, and information from other applications can be displayed in Visio as well.

As a part of the Microsoft Office System, Visio provides many of the same tools as Word 2003, Microsoft Office Excel 2003, and PowerPoint 2003 for sharing information. For example, you can use object linking and embedding (OLE) to place information from one application in another. You can also save Visio diagrams in alternative file formats, including Web-compatible graphics formats like GIF and JPEG, and e-mail Visio drawings right from your Visio toolbar. Just as you can use Visio data in different ways in other applications, you can pull all kinds of graphic or text information into Visio drawings.

This article provides the ins and outs of getting data in and out of Visio.

Top of Page Top of Page

Working with OLE

OLE provides the easiest way to place Visio shapes or diagrams into Word, Excel, PowerPoint, and other applications that support the Windows Clipboard and OLE. When you use OLE to place Visio shapes or diagrams, you maintain a connection with Visio, so you can edit the shapes or diagrams using Visio tools and features. OLE is just a broad name for the technology that allows you to use information from one application in another. All the Office System applications support OLE, which means that you can insert and edit Office documents within Visio, or add Visio diagrams to Office documents, as Figure 1 shows. Although OLE has been around for a while, you might not be familiar with the term. If you've ever copied and pasted information from one program into another, or used the Paste Special command in an Office application, you've probably taken advantage of OLE.

Visio diagram embedded in Word document
Figure 1. With OLE, you can embellish an ordinary Word memo by linking or embedding a Visio diagram in the document.

OLE boils down to linking and embedding, both of which support editing in place. Which technique should you use? It depends on the number of documents that will include the Visio information and how frequently you expect to revise the information.

  • Link a saved Visio diagram when you want to use it in one or more other documents.   When you update the original Visio file, the diagram will be updated in every document that contains it. Likewise, when you update the diagram within another document, the original and any other linked diagrams will also be updated.
  • Embed an existing Visio shape or drawing in another document when you want to be able to edit the Visio information without leaving the application's document.   This is probably the most common way to place Visio information into another program. Pasting Visio shapes into an Office document automatically embeds them.
  • Create a Visio diagram in place when you don't want to switch between different application windows.   You can start Visio from within another application to add and edit shapes, and if you're working in an Office document, plenty of Visio tools are available to use. Your shapes are saved with the application's document, not as a separate Visio drawing file.

One benefit of linking instead of embedding is that the document in which you use the Visio data stores only a reference to the Visio data. This keeps your document file size smaller and more manageable. However, applications keep track of links using the file name and location of each linked file — the link will be broken if you change the file name of the original diagram or move the files.

The main advantage of embedding is that you can maintain separate versions of a Visio diagram for different purposes. An embedded shape or diagram isn't linked to the original Visio drawing file, so you can make changes there that don't affect any of the embedded copies. In addition, an embedded diagram is available even if the original file is not. For example, you can print a Word document that contains an embedded Visio diagram from any computer, whether or not Visio is installed and the original Visio diagram file is on the computer. Of course, because the entire Visio diagram must be embedded in the document, the document's file size can increase dramatically.

You can also embed, link, and import objects created in other programs into Visio. The basic principles are the same.

 Tip    Visio does many things well, but it probably wouldn't be your first choice for word processing. For text-based documents, you'll save yourself some headaches if you create the diagrams in Visio, the words in another program, and then bring them all together using OLE. You can embed Visio diagrams in your word processor document or embed the text from your document in Visio.

Top of Page Top of Page

Linking a Visio diagram to an Office document

When you link a Visio diagram to a document in an Office System application, the document file stores a reference to the original diagram. If you edit the diagram — either in Visio or within the document — the diagram changes in both places. And if you've linked the diagram to more than one document, each of those documents will be updated. Because each of these documents is linked to a single Visio diagram, your document stays smaller, which means you can work in the document more quickly and it takes up less space on your hard disk. However, any time you need to use the Office document that contains the link, the original Visio diagram must be available.

A linked file is tracked and updated based on its file name and location. Let's say you link a Visio diagram to a PowerPoint slide. The next time you open that PowerPoint presentation, it searches for the Visio drawing file referenced by the link and displays the latest version. If you change the name of the Visio diagram file, or move it to a different folder after you link it, the link will be broken and the diagram won't appear in PowerPoint. If you link a diagram to an Office document, it's simplest to store the Visio diagram in the same folder as the Office document; if you need to move the document to another computer, make sure you move both the document and the linked diagram file. For example, if you created a presentation on your laptop computer, and then want to run the presentation from a different computer, copy both the presentation file and the linked Visio drawing file to the new computer. Before you can link a Visio diagram, you must save the file.

 Note   To display a linked Visio diagram in a document, your computer must have the applications used to create both the document and the Visio diagram. This limitation makes documents with links less portable. To send a document that contains links to another person, you must include all the files referenced by the links, and the recipient must also have all the applications used to create the documents and files. However, it doesn't matter which version of Visio the recipient has — both Visio 2003 Standard and Visio 2003 Professional can open diagrams created in the other version. Do not use object linking if you need to print the document from a computer that doesn't have Visio installed; embed the diagram instead.

To link to a Visio diagram from another application, follow these steps:

  1. In Visio, select the shapes or diagram on the Visio drawing page, and then choose Edit, Copy. Or, to include the entire drawing in the document, make sure nothing is selected on the Visio drawing page, and choose Edit, Copy Drawing.
  2. Open the document in which you want the data to appear. (For example, open PowerPoint, and then display the slide in which you want the Visio diagram to appear.)
  3. Choose Edit, Paste Special to display the Paste Special dialog box.

    Paste Special dialog box

     Note   Don't use the Paste command or the keyboard shortcut (CTRL+V), because you won't be able to create a link.

  4. Select Microsoft Visio Drawing Object, and then select the Paste Link option.

    You can paste only one page at a time, so if you want to paste multiple drawing pages from Visio, you'll need to repeat this process for each page.

  5. Click OK to paste the copied object.

Top of Page Top of Page

Editing a linked diagram

After you link a Visio diagram to another document, you can continue to work on the diagram. The document containing the link will reflect your changes.

To edit a linked Visio diagram, open the diagram in Visio, make any changes you want, and then save the file with the same file name in the same folder. You can also edit the linked diagram from within the document it's linked to. To do this, double-click the diagram in the document. Essentially, you've just used a shortcut to start Visio and open the drawing; otherwise, you work in Visio exactly as you would if you had opened the application separately.

Top of Page Top of Page

Updating a linked diagram

In most OLE client applications, linked objects are updated automatically each time you open the document. When you open the document, the application searches for each file referenced in a link and updates the appearance of the document to match the current version of the linked diagram. If the application can't find the file, it will prompt you to locate it. Even when a linked object is set to update automatically, you can manually update the link at any time to reflect changes you've made in the diagram.

If you expect to edit your original Visio diagram frequently and won't always have access to it from the linked document, you might want to set the object to manual linking, rather than to automatic. That way, you won't receive prompts to locate the file every time you open the document. If you do set a link for manual updating, make sure you actually update the link before you print or publish it so that changes you've made to the diagram are reflected in the document.

To update a link manually in most OLE-compatible applications, follow these steps:

  1. Select the linked Visio object in the document, and then choose Edit, Links to display the Links dialog box.

    Depending on the application you're working in, the dialog box might not exactly match the illustration that follows. If you don't see this command in your application, refer to its documentation for links management commands.

    Links dialog box
  2. Select Manual, and then click OK.
  3. To update the link manually, choose Edit, Links.
  4. Select the Visio source file, and then click Update Now.

 Tip   You can manually update a link at any time whether you've chosen the automatic or manual update method.

Top of Page Top of Page

Embedding a Visio diagram in an Office document

You can embed Visio shapes or diagrams into Microsoft Office 2003 documents. Embedding has some convenient advantages:

  • Embedded shapes or diagrams are stored in the document in their entirety, but you can edit them using Visio tools without switching to Visio or leaving the document.
  • The embedded document is stored separately from any other Visio diagram, so changes you make won't affect the original diagram file.
  • Because embedded diagrams are stored in the document, they travel with the document, so you can view and print them accurately when you open the document on a computer that doesn't have Visio installed.

The primary disadvantage of embedding is file size. Because all the Visio shape data is stored in the document, its file size can increase dramatically when you embed a Visio image.

You might not be aware that Visio shapes are automatically embedded in an Office document every time you copy from Visio and paste in Office. You can also drag shapes from Visio to a document in Microsoft Office Word 2003, Microsoft Office Excel 2003, Microsoft Office PowerPoint 2003, or other OLE-compliant applications. Just make sure both applications are open and visible and that neither window is maximized, so you can see them both at once. Hold down the CTRL key while you drag the shape you want from the Visio drawing into the other document.

 Note   Dragging shapes from a Visio diagram into a document in another application moves the shapes to the other document and deletes them from the Visio diagram. To drag a copy of the shape, press the CTRL key as you drag. The pointer displays a plus sign to indicate that you are copying the shape, not moving it. If you accidentally move the object and delete it from the Visio diagram, choose Edit, Undo from the Visio menu to recover it.

If you want to ensure that you don't disturb your original Visio diagram, a safer option for embedding shapes and diagrams is to copy and paste them. First select the shapes you want to embed. Then copy the shapes to the Clipboard using your favorite method of copying: press CTRL+C, choose Edit, Copy, or click the Copy button on the Standard toolbar. Next, switch to the document in which you want to embed the shapes (for example, press ALT+TAB to switch between open programs in Windows), and press CTRL+V or choose Edit, Paste. The shapes appear as part of your document. In an Office document or in any other application that supports OLE, the shapes are embedded, so you can edit them from within the document.

 Tip   If you paste shapes into an application that doesn't support OLE, the shapes are pasted as a graphic that you can't edit.

Top of Page Top of Page

Embedding an entire Visio diagram

You can embed an entire Visio diagram in another document if you use the Copy Drawing command, as Figure 2 shows. If you have a multiple-page Visio diagram, you can copy only one page at a time. You can then embed that page and repeat for each page in the diagram.

Copy Drawing command to embed diagram
Figure 2. To embed an entire diagram, use the Copy Drawing command to copy each page, and then paste in the desired document.

 Tip   Don't worry about losing your layer settings in embedded drawings. In some earlier versions of Visio, when you embedded a Visio drawing that included layers, your layer settings were ignored in the embedded copy. For the most part, this limitation only affected hidden layers, which would unexpectedly appear in the embedded diagram. Fortunately, Microsoft Visio 2002 and Visio 2003 don't include this restriction. Hidden layers remain hidden, even if you embed your diagram.

To embed an entire page of a Visio diagram, follow these steps:

  1. In Visio, display the page you want to copy and embed.
  2. Make sure nothing is selected, and click Copy Drawing Button imageon the Standard toolbar or choose Edit, Copy Drawing.

    Visio copies everything in the diagram, including shapes on other pages and backgrounds. Stencils aren't copied, nor are other parts of the Visio window that aren't part of your diagram, such as the Pan & Zoom window.

  3. Switch to the document into which you want to embed the diagram.

    Tip   Press ALT+TAB to switch between applications.

  4. Place the cursor where you want to insert the diagram, and then press CTRL+V or choose Edit, Paste to paste it into your document.

Top of Page Top of Page

Troubleshooting

You receive an error when you edit a linked or embedded diagram  The error message you receive might vary, depending on the application you're using and the problem it encounters. Most likely, though, either the application cannot find the original Visio diagram (in the case of a linked diagram) or your computer can't start Visio. Verify the following:

  • Is Visio installed on the computer you're using? Make sure that the computer has enough memory to run both applications.
  • If Visio is running, is it displaying a dialog box? If Visio is awaiting your instructions, it cannot respond to the call made by the other application.
  • Is a copy of the diagram open in Visio? You can have only one copy of the diagram open at a time.
  • Has a linked file been moved or renamed? If you're working with a linked diagram, verify the name and location of the original diagram file. If it has been renamed or moved, you can update the link in the document. To do this, choose Edit, Links in the open document containing the link, and then choose Change Source. (The command name may vary in non-Office applications.)

Top of Page Top of Page

Get Office 2007
Get Office 2007
advertisement