Part 4: Testing the add-in that exports Visio 2010 diagrams to PowerPoint 2010

Office 2010

Summary:  The last article in a series of four articles about how to export Microsoft Visio 2010 shapes to Microsoft PowerPoint 2010. Part 4 discusses how to test and publish the add-in that you create to do the work.

Last modified: June 12, 2012

Applies to: Office 2010 | PowerPoint 2010 | SharePoint Server 2010 | Visio 2010 | Visio Premium 2010 | Visual Studio 2010

In this article
Testing and Publishing the Add-In
Conclusion
Read the Other Articles in this Series

Published:  June 2012

Provided by:  Eric Schmidt, Microsoft Corporation

Contents

Download the code

Now that all the files in the project are complete, it is time to debug the add-in in Visio to find any problems in the code.

When you test the add-in, answer the following questions:

  • Do the custom ribbon tab, group, and buttons load when the application loads?

  • Do both custom button images load? Are they the correct buttons?

  • If you click one of the two buttons when no document is open, does Visio or Visual Studio throw an error? Does it notify you if the Visio page is larger than 10" by 7.5"?

  • If you click Export Page, is a new PowerPoint presentation with a single slide created? If you click Export Diagram and the Visio document contains two or more pages, is a new PowerPoint presentation with multiple pages created?

  • When you export shapes from the "Basic Flowchart Shapes (US units)" stencil, do the shapes on the PowerPoint slide match the geometry of the shapes on the Visio page? Are the shapes in the same relative positions?

  • Do the shapes on the PowerPoint slide have the same fill color as their analogs on the Visio page? Do they contain the same text?

  • When you export shapes from a stencil other than "Basic Flowchart Shapes (US units)," do the pictures on the PowerPoint slide match the shapes in Visio? Are they in the same relative positions? Is any text that is with the picture correct and editable (formatting notwithstanding)?

  • Do the connectors on the PowerPoint slide connect the same shapes as the connectors on the Visio page? (The exact beginning/end points might change when the connectors are rerouted.)

Use the following procedure to test the add-in and answer the questions in the list.

To run the project and test the add-in within Visio

  1. In Visual Studio, press F5 to debug the add-in. (Visio opens.)

  2. In Visio, click File.

  3. In the Backstage view, click New, and then under Template Categories click Flowchart.

  4. Under Choose a Template, double-click Basic Flowchart.

  5. Drag shapes onto the drawing page to create a diagram:

    • Add text to at least one shape.

    • Change the fill color for at least one shape.

    • Connect two shapes using the dynamic connector.

  6. On the Export tab, in the Export to PowerPoint group, click Export Page. If prompted, click Continue.

    PowerPoint opens and a new presentation with a single slide appears.

  7. On the Insert tab, in the Pages group, click Blank Page. In the Pages list, select the new page.

  8. In the Shapes window, click Cross-Functional Flowchart Shapes (US units). Drag a Swimlane onto the drawing page.

  9. On the Export tab, in the Export to PowerPoint group, click Export Diagram. If prompted, click Continue.

    Another presentation opens in PowerPoint that contains two slides.

Once you have thoroughly tested the add-in and are ready to publish it, you must decide how to deploy the add-in to users. You can deploy solutions by using ClickOnce or Windows Installer (MSI) deployment technologies:

  • ClickOnce installs the solution with the user privileges of the user who executes the installation. The main advantages to ClickOnce solutions are that they simplify solution deployment and have an automated mechanism for distributing your updates. However, a solution that is installed by using ClickOnce is available only to the user who installs the solution.

    For more information about how to deploy a Visual Studio 2010 solution for Visio 2010 by using ClickOnce, see Publishing Office Solutions by Using ClickOnce and How to: Publish an Office Solution by Using ClickOnce.

  • A Windows Installer deploys the add-in to the current user or all users on the target computer and can also be distributed to multiple computers by using Systems Management Server (SMS). This method of deployment is required for any solution that requires administrative privileges. Windows Installer enables you to configure the deployment in more detail, but also requires more effort to configure correctly.

    For more about how to deploy a Visual Studio 2010 solution for Visio 2010 by using a Windows Installer, see Publishing an Office Solution by Using Windows Installer and Deploying a Visual Studio 2010 Tools for Office Solution Using Windows Installer.

Because this add-in does not require administrator privileges, the easiest way to publish the solution is to use ClickOnce. Use the following procedure to publish the solution via ClickOnce.

Note Note

The Microsoft Visual Studio 2010 Tools for Office Runtime and the .NET Framework 4 are required to install Visual Studio 2010 for Visio 2010. Users who want to install the solution on their computer must have these components installed first. In your solution, you can prompt users to download the components at installation or to include the components in the ClickOnce manifest. For more information, see How to: Install Prerequisites on End User Computers to Run Office Solutions.

To publish the Visual Studio 2010 solution for Visio 2010 using ClickOnce

  1. In Solution Explorer, right-click the project name (ExportToPPT) and then click Publish.

  2. In the Publish Wizard, click Next to accept the default publishing location.

  3. On the What is the default installation path on end user computers page, click From a CD-ROM or DVD-ROM and then click Next.

  4. On The application is ready to publish page, review the information and then click Finish.

    Visual Studio publishes the solution to the location that you specified. The published solution files include the following: the application files folder, which contains a version-specific application manifest, a version-specific deployment manifest, and the customization assemblies, a Setup program, and a deployment manifest that points to the latest version-specific deployment manifest.

Visio 2010, PowerPoint 2010, and Visual Studio 2010 give developers the flexibility and tools to create solutions. The Exporting Visio 2010 Diagrams to PowerPoint 2010 add-in is only one example of how you can use code in one Office 2010 application to control another, customize the Visio 2010 ribbon, read formatting information from Visio Shape objects, and convert Visio shapes to PowerPoint shapes.

Show: