• Skip to main content
  • Skip to primary sidebar
  • Skip to footer

bVisual

  • Home
  • Services
    • How Visio smartness can help your business
    • Visio visual in Power BI
    • Visio Consulting Services
    • Visio Bureau Services
    • Visio Training and Support Services
  • Products
    • Visio Shape Report Converter
    • SS Plus
    • LayerManager
    • visViewer
    • Metro Icons
    • Rules Tools for Visio
    • The Visio 2010 Sessions App
    • Multi-Language Text for Visio
    • Document Imager for Visio
    • multiSelect for Visio
    • pdSelect for Visio
  • Case Studies
    • Case studies overview
    • Using Visio in Education for GIS
    • Visualizing Construction Project Schedules
    • Visio Online Business Process Mapping
    • Nexans Visio Template
    • CNEE Projects, WorldCom
    • Chase Manhattan Bank
  • News
    • Recent news
    • News archive
  • Resources
    • Articles➡
      • ShapeSheet Functions A-Z
      • Comparing Visio for the Web and Desktop
      • Customising Visio Shapes for the Web App
      • Key differences between the Visio desktop and web apps
      • Using the Visio Data Visualizer in Excel
      • Using Visio in Teams
      • Creating Visio Tabs and Apps for Teams with SharePoint Framework (SPFx)
      • Designing Power Automate Flows with Microsoft Visio
      • Innovative uses of Visio Lists
    • Webcasts ➡
      • Visio in Organizations
      • My session and other Visio sessions at MSIgnite 2019
      • Power up your Visio diagrams
      • Vision up your Visio diagrams
      • The Visio 2010 MVP Sessions
    • Visio Web Learning Resources
    • Books➡
      • Visualize Complex Processes with Microsoft Visio
      • Mastering Data Visualization with Microsoft Visio
      • Microsoft Visio Business Process Diagramming and Validation
      • Visualizing Information with Microsoft Visio
  • Blog
    • Browse blog articles
    • Visio Power BI articles
    • Visio for Web articles
    • A history of messaging and encryption
  • About us
    • About bVisual
    • Testimonials
    • Bio of David Parker
    • Contact Us
    • Website Privacy Policy
    • Website terms and conditions
    • Ariba Network
You are here: Home / Visio / Using the Microsoft Visio Viewer (and introducing visViewer)

Published on December 15, 2008 by David Parker

Using the Microsoft Visio Viewer (and introducing visViewer)

Microsoft Outlook 2007 installs the Microsoft Visio Viewer (vviewer.dll via vpreview.exe) by default, so that native Visio files can be seen in all their glory (almost).  In this blog I’ll show that the Visio Viewer actually provides access to the Shape Data (Custom Properties), Hyperlinks, Reviewers Markup and Layers.  All this without even having Visio installed!

This is great because multiple page documents can be browsed, panned and zoomed.

However, this presentation of the Microsoft Office Visio previewer hides quite a lot of its functionality of this, so it is difficult to toggle layer and reviewers markup visibility, or to view the shape data/custom properties.

There is an existing web article which demonstrates how to use the Visio Viewer in SharePoint (http://www.wssdemo.com/Pages/visio.aspx), and the same method can be used in a web page.  This presentation of the Visio Viewer does enable the user to get the extra functionality, but it does not allow the shape data to be searched, listed or extracted.  Neither does it allow you to print easily.

Well, I wrote visViewer as a vb.net wrapper for the Microsoft Visio Viewer 2003 version several years ago, and now I have updated it for the Microsoft Visio Viewer 2007 (see  http://www.bvisual.net/Products/visViewer.aspx). The newer version provides access to shapes with shapes, just as the reporting tool full version of Visio was enhanced to provide access to shapes within shapes. This time I have released it as shareware, so feel free to try it, and, if you like it and use it commercially, you may wish to donate towards its development.

visViewer demonstrates that all the Shape Data on all of the shapes on each page in the Visio document are visible to code.  The main principle is that the CurrentPageIndex of the Viewer control needs to be set to an integer number up to the PageCount before the shapes can be read.  For example the following block of code shows how you can

With Me.AxViewer1
 .CurrentPageIndex = n
 For
 lShape As Integer
 = 1 To .ShapeCount
 ‘You can use .get_ShapeName(lShape)
     For
 lProperty As Integer
 = 1 To
 .get_CustomPropertyCount(lShape)
        ‘ You can use .get_CustomPropertyName(lShape, lProperty)

        ‘ and .get_CustomPropertyValue(lShape, lProperty)

    Next lProperty 
     For
 lHyperlink As Integer
 = 1 To
 .get_HyperlinkCount(lShape)
        ‘ You can use .get_HyperlinkAddress(lShape, lHyperlink)

    Next lProperty
 Next lShape  
 End With

Once you have read the data inside each shape, then you can provide searching and exporting.

In addition to reading the Shape Data, I also collect the Hyperlinks, and thus it is possible to show multiple hyperlinks on shapes, and to provide the ability to follow them.

One shortcoming of the Visio Viewer is the lack of any method to zoom to a shape in the document.  Strangely, there is a method to the shape at any xy co-ordinate (get_ShapeAtPoint), but not one to get the xy co-ordinate of a shape.

Another shortcoming of the Visio Viewer is the lack of printing, but I have been able to partially address this by using the PrintForm method from the Visual Basic Power Packs.  However, this only outputs raster, which is never going to be as crisp as vectors.

I decided to use the Microsoft ReportViewer (because it is simple and royalty free) for the reports that provide printing, or export to Excel or Pdf, of the shape data.

Lastly, I provided the ability to open a Visio document from the menu, or by dropping a Visio document on to the Visio Viewer panel, or by opening from Window Explorer (if the msi installation is used rather than the ClickOnce).

I hope that visViewer proves useful to non-Visio and Visio users alike, and hope that it encourages the use of Visio files as a portable data graphic file format.

Related

Filed Under: Visio, Visio Viewer, visViewer

About David Parker

David Parker has 25 years' experience of providing data visualization solutions to companies around the globe. He is a Microsoft MVP and Visio expert.

Reader Interactions

Comments

  1. sivabala says

    March 8, 2011 at 12:43 pm

    I could not able to view files with extension .vsd even though Visio viewer is installed in my computer.

    Can anyone help me out of this?

    Log in to Reply
    • davidjpp says

      March 14, 2011 at 8:55 pm

      Can I ask:
      1) Did you download the latest Microsoft Visio Viewer?
      2) Did you then install visViewer?
      3) What version of Viso were the vsd files created in?

      Log in to Reply
      • Sivabala says

        March 15, 2011 at 9:53 am

        I am using microsoft visio viewer 2007 version. I installed it in my laptop.

        Log in to Reply
        • davidjpp says

          March 15, 2011 at 10:39 am

          You need to install the 2010 version from http://www.microsoft.com/downloads/en/details.aspx?displaylang=en&FamilyID=f9ed50b0-c7df-4fb8-89f8-db2932e624f7
          Microsoft stopped the old one from working – see http://blogs.msdn.com/b/visio/archive/2009/12/28/updates-regarding-the-visio-viewer.aspx

          Log in to Reply
  2. JanB says

    March 19, 2012 at 1:37 pm

    I cannot run VisViewer on W7 64 at all, it closes immediately without a solution.
    I cannot get Visio 2010 with SP1 to view a vsd-file either, it is supposed to run in IE but can’t get it running, searched Google but couldn’t find an appropriate answer which worked for me.

    Log in to Reply
    • davidjpp says

      March 19, 2012 at 10:48 pm

      I have the Visio Viewer and visViewer working fine on my Windows 7 64 bit PC, so I can only assume that you do not have the latest correct version of the Microsoft Visio Viewer from http://support.microsoft.com/kb/2460065, and then please try this link for visViewer afterward http://www.visiorules.com/products/visViewer/install/visViewerSetup.zip – this is the 64bit version that I need to add a link to on the bVIsual site.

      Log in to Reply
  3. saleem says

    July 9, 2012 at 3:34 pm

    Does Visio Viewer or visViewer allow macros to run? i ask becasuse i cant seem to get a .vsd with a button and click macro to trigger at all..

    Log in to Reply
    • davidjpp says

      July 9, 2012 at 3:36 pm

      No, I am afraid not. visVieweer uses the Microsoft Visio Viewer, which is read only.
      You need to open in Visio to run a macro, and thus go through the usual security checking.

      Log in to Reply
  4. San Russo says

    October 4, 2012 at 8:32 am

    Hi
    Use Visio 2007, have created data taht links to multiple hyperlinks (seperate documents), all works fine. Problem is when a user uses Visio Viewer, they dont get the hyperlink icon on the pointer of the mouse (not a big issue) but when the select the object only one hyperlink can be opened, the none of the others appear to select.

    SR

    Log in to Reply
    • davidjpp says

      October 4, 2012 at 9:15 am

      If you use my VisViewer app, then you can get access to all of the hypelinks via the Document explorer

      Log in to Reply
  5. Stephen Lipp says

    August 17, 2013 at 3:40 pm

    I have inherited a project in VS2010 which has a set of Visio UML diagrams. I was hoping to at least “view” the diagrams, but when I double-click them, I get the Microsoft Office message box, “This program can only run from within another program.” Huh?

    SL

    Log in to Reply
    • davidjpp says

      August 30, 2013 at 11:29 am

      Do you have Visio?
      If not, you can use the visViewer to view them. See http://www.bvisual.net

      Log in to Reply
      • Stephen Lipp says

        August 30, 2013 at 1:18 pm

        I have the Visio Viewer. I am now noting I can launch it from IE, but seemingly nowhere else. Is this how it must be?

        SL

        Log in to Reply
        • davidjpp says

          August 30, 2013 at 1:22 pm

          The Microsoft Visio Viewer has to be embedded into another app, such as Internet Explorer, or my own visViewer.

          Log in to Reply
          • Stephen Lipp says

            August 30, 2013 at 3:03 pm

            Is there a way to embed Visio Viewer into Visual Studio?

          • davidjpp says

            August 30, 2013 at 3:07 pm

            Yes, it is just an ActiveX control.
            If you install the Visio SDK, then you will find a reference in the Visio SDK Documentation

Trackbacks

  1. Visio data to Excel says:
    December 16, 2015 at 12:54 pm

    […] document.write(''); Hello and welcome to The Board. It is difficult to find resources for Visio programming and there are only a few books on the subject. However, in addition to Visio Guy, see if you can find what you are looking for in the following: https://msdn.microsoft.com/en-us/lib…/ff768041.aspx Using the Microsoft Visio Viewer (and introducing visViewer) | bVisual – for people interested in Mi… […]

    Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

  • LinkedIn
  • Twitter

Recent Posts

  • Co-authoring and Commenting with Visio Documents
  • Fixing dimensions of 2D shapes
  • Merging Linked Data from Similar Tables
  • Smart Radio Buttons and Check Boxes in Visio
  • Using Button Face Ids in Visio

Categories

Tags

Accessibility Add-Ins Connectors Containers Data Export Data Graphics Data Import Data Visualizer Educational Excel GraphDatabase Hyperlinks Icon Sets JavaScript LayerManager Layers Legend Link Data to Shapes Lists MSIgnite MVP Office365 Org Chart PowerApps PowerBI PowerQuery Processes Setup and Deployment Shape Data Shape Design ShapeSheet ShapeSheet Functions SharePoint 2013 SQL Teams Validation VBA Video Visio Visio 2007 Visio for the Web Visio Online Visio Services Visio Viewer Webinar

Footer

bVisual Profile

The UK-based independent Visio consultancy with a worldwide reach. We have over 25 years experience of providing data visualization solutions to companies around the globe.

Learn more about bVisual

  • Amazon
  • E-mail
  • Facebook
  • LinkedIn
  • Twitter
  • YouTube

Search this website

Recent posts

  • Co-authoring and Commenting with Visio Documents
  • Fixing dimensions of 2D shapes
  • Merging Linked Data from Similar Tables
  • Smart Radio Buttons and Check Boxes in Visio
  • Using Button Face Ids in Visio

Copyright © 2025 · Executive Pro on Genesis Framework · WordPress · Log in