Embedding a Diagram in a Microsoft Office Document

You can embed Visio 2007 shapes or diagrams into Office 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 2007 tools without switching to Visio or leaving the document.

  • The embedded document is stored separately from any other Visio 2007 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 2007 installed.

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

You might not be aware that Visio 2007 shapes are automatically embedded in an Office document every time you copy from Visio 2007 and paste in Office. You can also drag shapes from Visio 2007 to a document in Word, Excel, PowerPoint, 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 2007 drawing into the other document if you want to copy the shape.

Note

Dragging shapes from a Visio 2007 diagram into a document in another application moves the shapes to the other document and deletes them from the Visio 2007 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. (The object placed in the target application will not be removed.)


If you want to ensure that you don’t disturb your original Visio 2007 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.

Note

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


Embedding an Entire Visio 2007 Diagram

You can embed an entire Visio 2007 diagram in another document if you use the Copy Drawing command, as Figure 7-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 the process for each page in the diagram.

Figure 7-2. To embed an entire diagram, use the Copy Drawing command to copy a page, and then paste the page into the desired document.


To embed an entire page of a Visio 2007 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 on the Standard toolbar or choose Edit, Copy Drawing.

Copy Drawing

3.
Visio copies everything in the diagram, including shapes on other pages and backgrounds, although it will also display one page. Doubling-clicking the displayed page, however, will open the entire drawing for editing. 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.

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

Note

Press Alt+Tab to switch between applications.

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

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


Using Visio 2007 Shapes in Other Programs

If you’re working in another program, such as Word or PowerPoint, you can quickly add Visio shapes to your document using the same drag-and-drop technique you use in Visio. Although you can always drag shapes from a Visio 2007 drawing page or stencil to another application, there’s a great shortcut for using shapes without opening Visio. You might find it more efficient to open only a stencil, as Figure 7-3 shows. The stencil takes up less screen real estate than the full Visio application, so it’s easier to see what you’re doing.

Figure 7-3. A quick way to add Visio 2007 shapes to another document is to open only a Visio stencil file (.vss) using Windows Explorer. Then, you can drag the shapes you want into the document.


The trick is to open a Visio 2007 stencil file directly from Windows Explorer when Visio isn’t running. In Windows Explorer, double-click on the Visio 2007 stencil that contains the shapes you want to use. If Visio is running, you’ll see the entire application window, which isn’t the desired result in this case. You want to see just the stencil window. When you add a shape to the other application’s document, the application adds it as an embedded object. You can then double-click the shape to edit it with Visio 2007 drawing tools.

The location of the stencil file depends on how you installed Visio 2007. If you accepted the default destination folders during installation, you’ll find stencil files in C:Program FilesMicrosoft OfficeOffice121033<filename>. For example, to open the Basic Shapes stencil, navigate to C:Program FilesMicrosoft OfficeVisio111033Basic_u.vss.

Inside Out: .vss and .vst files

The 1033 folder includes stencil (.vss) files and template (.vst) files. If you open a template file, the entire Visio 2007 window opens. If Windows Explorer doesn’t display file extensions, you can see whether the file is a template or stencil file by looking in the Type column next to the file, which displays either “Microsoft Visio Stencil” or “Microsoft Visio Template.” You can also hover the mouse over a file’s icon to display a ScreenTip that shows the file type and other information.


Creating a Visio 2007 Diagram Within Another Application

Suppose you’re working on a report or presentation and you realize that you can make your point more clearly with a quick timeline or flowchart. You can bring an existing Visio 2007 diagram into your document, or create a brand new one, without ever leaving your report or presentation. In fact, any application that supports the current Windows OLE standard allows you to work with Visio 2007 in place. This means you can edit Visio shapes within the other application’s window, as Figure 7-4 shows.

Figure 7-4. When you edit a Visio 2007 diagram in place in another application, you can use the Visio tools to create a diagram within the application’s window.


Note

To find out whether an application supports the latest OLE standard, open the application, and search for an Insert Object command. (You can usually find this command on the Insert menu but it might be located elsewhere.) Check the application’s documentation or online Help files as well.


Not all applications support in-place editing. Sometimes, when you edit an embedded or linked Visio 2007 diagram, the Visio program window opens instead. The instructions provided here apply to Microsoft Office applications, but the process is similar in any application that supports in-place editing. To create a Visio drawing in place in an Office document, follow these steps:

1.
In your Office document, place the cursor where you’d like the diagram to appear, and then select the Insert Tab, Text Group, Insert Object (icon).

2.
Select Microsoft Office Visio Drawing from the Object Type list, and then click OK.

3.
The Choose Drawing Type window opens just as if you had started Visio 2007 to create a new diagram.

4.
Select a template for the type of diagram you want to create, and then click OK.

5.
A Visio 2007 drawing page opens with a set of stencils, and the Visio toolbars and menus replace the original application toolbars and menus. If the Visio program window opens instead, your application doesn’t support in-place editing, but you can still create and embed a Visio diagram.

6.
Create the diagram, working as you ordinarily would in Visio 2007—that is, add shapes, connections, text, and so on.

7.
To return to the original application, click somewhere in the document outside the Visio diagram.

The original toolbars and menus appear. If your application doesn’t support in-place editing, and you’ve been working in the Visio 2007 program window, choose File, Exit & Return To <name of your document> to return to the original application.

Note

To move an embedded Visio 2007 diagram around on the page, select it, and then drag it by the selection border. Drag a handle on the selection border to resize the embedded diagram.


Editing an Embedded Diagram

To make changes to an embedded Visio 2007 diagram—whether you pasted, dragged, or created it in place—double-click the embedded object. For example, if you paste a single Visio 2007 shape into an Excel document, you can double-click the shape to open it for editing, as Figure 7-5 shows. If you’re working in an Office program of recent vintage, the Visio 2007 toolbars and menus temporarily replace the application’s tools. For other programs, Visio starts in a new window that displays the embedded diagram or shape.

Figure 7-5. Whether you’ve embedded one shape or an entire diagram, you can edit within the document that contains the embedded data by double-clicking the Visio image.


If you embed an entire drawing page or diagram and then edit it, Visio 2007 also opens any stencils that were open with the original drawing, as Figure 7-6 shows. To open an additional stencil, use the Shapes button on the Standard toolbar or choose File, Shapes, and navigate to the stencil you want to open.

Figure 7-6. You can open stencils from within the Visio 2007 editing window when you’re working on an embedded diagram.


Note

When you edit an embedded object, you can gain working space and resize the drawing in the same way. Point to a handle on the in-place selection border. The pointer displays a two-headed arrow. Now you can drag to change the size of the Visio diagram that is displayed.


When you edit an embedded shape or diagram, you can insert new pages, display the Drawing Explorer or Pan & Zoom window, reorder pages, and more. When you’re done making changes, you can return control to the other application in one of two ways:

  • If you’re editing in place, click the document page outside of the Visio 2007 window. The application’s toolbars and menus are restored.

  • If you’re editing in a Visio 2007 program window, choose File, Exit & Return To <name of your document>.

Make sure to save the document after you make changes to the embedded object. An embedded diagram exists only in the Office document, so if you don’t save it, you could lose all your changes.

Note

When working in the Office Suite, you can also insert a hyperlink to an embedded diagram. Right-click on the diagram and choose Hyperlink. This displays the Insert Hyperlink dialog box. Choose the type of link you wish to insert, browse to the target location, and click OK.


Inside Out: Save an embedded diagram as a separate Visio file

There’s a way to save an embedded diagram as a separate Visio 2007 file as long as you’re working on a computer that has Visio installed. For example, if you embed a diagram in a Word document and don’t save the original Visio drawing file, you can save the embedded object. To do so, right-click the embedded Visio object, and then choose Visio Object, Open. This opens Visio with the embedded diagram displayed on a drawing page. Choose File, Save Copy As, and then name the file and choose a location for it.


Sizing an Embedded Visio 2007 Diagram

When you copy an entire Visio 2007 drawing page and then embed or link it, the size of the Visio object in the new document is based on the page size specified for the original Visio page. Sometimes this can create a large area of white around the Visio object; at other times, the embedded Visio shapes might appear crowded. You can size an embedded object by dragging a handle on the thick selection border, but sometimes that isn’t enough. You can also adjust the spacing within Visio 2007. Right-click the embedded or linked Visio diagram, and then choose Edit, Visio Object, Open or Open Link. Then, to reduce the amount of white space around an embedded or linked diagram, choose File, Page Setup, and then click the Page Size tab. Select the Size To Fit Drawing Contents option, and then click OK to close the Page Setup dialog box. Choose File, Exit & Return To <name of your document>.

Pasting Without Embedding

If you don’t expect to edit a diagram or shapes that you’re displaying in another document, you can keep your file size smaller by pasting without embedding. You won’t be able to double-click the diagram and have instant access to all the Visio 2007 tools, but you also won’t clutter your file with all the information that a document includes to support OLE. You can use the Picture or Picture (Enhanced Metafile) options in the Paste Special dialog box to paste Visio shapes into an Office document in a way that takes up less space, as Figure 7-7 shows.

Figure 7-7. To paste Visio shapes into another document without embedding them, choose Edit, Paste Special, to display these options.


In Visio 2007, you can copy the shapes you want. To copy an entire page, choose Edit, Copy Drawing. In the Office document, position the cursor where you want to insert the diagram or shapes, and then choose Edit, Paste Special. Select either Picture or Picture (Enhanced Metafile), and then click OK.

Note

The Paste Special command works in Visio 2007, too, and is a great way to paste text from Word when you don’t want to retain its formatting. Paste it as Unformatted Text.


..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset