How to display Visio file in SharePoint web part


I have an idea recently that I want our project web site could display Office Visio file and Office Project .mpp file.


Visio attract me very much for its powerful diagram elements, it could centralize my thinking in a diagram and it is so easy understanding and abstractive in every phase of project life cycle.


For .mpp file I want to replace normal list web part with gantt diagram. Normally we maintain a task list in SharePoint account for the project schedule, but I'd rather to use project file to plan and monitor the project status, because task list is not straitforward for task dependency and task hierarchy, but gantt diagram is a good choice to me.


I found a method to display visio file in SharePoint web part and I don't know if it is the only solution or not now.


Visio 2003 Viwer active-x control must be installed in client machine even if it has office 2003 installed, before client user browse the sharepoint web page containing visio web part (I don't like this, but in vain). This active-x control is an add-in of IE to display visio diagram. It could be found at http://www.microsoft.com/downloads/details.aspx?FamilyId=3FB3BD5C-FED1-46CF-BD53-DA23635AB2DF&displaylang=en.


In SharePoint you could drag & drop a Content Editor web part onto a web part page, then click "Source Editor" button to imput following:


<OBJECT classid="CLSID:279D6C9A-652E-4833-BEFC-312CA8887857"
codebase="http://download.microsoft.com/download/4/5/2/452f8090-413f-408f-83c0-edd66db786ee/vviewer.exe"
id="viewer1" width="100%" height="100">
<param name="BackColor" value="16777120">
<param name="AlertsEnabled" value="1">
<param name="ContextMenuEnabled" value="1">
<param name="GridVisible" value="0">
<param name="HighQualityRender" value="1">
<param name="PageColor" value="16777215">
<param name="PageVisible" value="1">
<param name="PropertyDialogEnabled" value="1">
<param name="ScrollbarsVisible" value="1">
<param name="ToolbarVisible" value="1">
<param name="SRC" value="http://wssxxxx/Shared%20Documents/Yukon%20Timeline.vsd">
<param name="CurrentPageIndex" value="0">
<param name="Zoom" value="-1">
</object>


Red color string indicates the visio file's location in SharePoint. Other parameters could be set according to its effect in IE visio viewer.


The result doesn't meet my idea completely, anyway it is a solution for displaying the visio file in SharePoint.


Useful link: http://www.wssdemo.com/Pages/visio.aspx?menu=Articles.

Comments (18)

  1. Roy says:

    I am very curious how to do the .mpp viewing in a web part, did you figure this out?  I checked your references, but to no avail, did not find anything… thoughts?

  2. Elton says:

    For showing .mpp file in a webpart, I didn’t investigate it further more.

    I will post here if I get the solution.

    Thanks/Elton

  3. Greg says:

    Nice Tip.

    2 questions if I may.

    1. Any way to have one page setup and pass the name of the new file to load to the viewer depending on what the user clicks?

    2. How I do this with Word? PDFs?

    Thanks,

    Greg

  4. Elton says:

    Greg, if my understanding is correct, you want to create two web parts. In the first one all filenames are listed like the Windows Explorer. When user click a filename, the content of the selected file will appeared in the second web part.

    I think these two web parts could be created using Consumer/Provider model, and the connection parameter is the selected filename. Here is an excellent article on this topic, "A Developer’s Introduction to Web Parts", http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_SP2003_ta/html/sharepoint_northwindwebparts.asp

    For the word/pdf question, sorry I don’t have any expertise on it. Just guess the Content Editor Web Part may help.

    Thanks/Elton

  5. Dries says:

    Hi thanks for you advice, but the "viso webpart" looks liek a picture, rather than an active element.

    Is it also possible to use the visio activily – hyperlinks in the flow which send you to a specific part of the documentation?

    If yes, is this hardcoded file location or a relative location to where you can send the hyperlink?

    Maybe you can help me, thanks in advance!

    Dries

  6. Elton says:

    Yes, I have the same feeling with you, that the visio web part is not flexible enough. I have no experience to make it active, so can’t help you more on this.

    Thanks/Elton

  7. samhuang says:

    Thanks, and besides read only, can we edit Visio files in Sharepoint?

  8. Kishore says:

    Elton,

    Thank you for sharing. This solution works for me perfectly.

  9. Just talked with my colleague Marijn Somers about viewing documents directly on SharePoint sites, when

  10. bug in the example says:

    Change the example to be height 100% instead of 100

  11. John says:

    Actually, I’ve found the width and height need to be 800×600 or some ratio slightly higher or lower (depending the page/zone layout)for it to display largely enough in the Web Part to be useful.  In fact I tried this ratio

    width="1024" height="768" with

    <param name="Zoom" value="-3"> and it looks pretty good to me.

  12. William says:

    Save the visio file as a .vdx (xml) file. Use the "Page Viewer Web Part" in Sharepoint to display the .vdx file. Using IE 5 or later will automatically display the file as a webpart with the visio viewer tool bar. Unfortunately any hyperlinks in the .vdx file open in the web part. Also there is no data refresh to connected data source which is very irritating.

    Does anyone know how to change the visio viewer web part to open hyperlinks in a new tab?

  13. jackdougher says:

    An alternative solution that incorporates a Visio diagram into a SharePoint 2007 non-publishing page (team site page) and renders the diagram fully functional can be found at this page: http://docucentric.net/index.php?p=1_8

  14. Cleber Marques says:

    Hi Elton, please, can you help me? I have tried to use this tips to integrate Visio and WSS. All works fine, thank you. But, when I try to access the page that have Visio file from other computer, using IE, the page dont open, I have Visio Viewer installed locally, but the page don't open, if I remove Visio File from web part I can open WSS page from any computer in my environment. ANy tips?

  15. imran says:

    I have tried what you suggested but it is not showing up. help required.

Skip to main content