I have a site collection of type "Publishing>>Enterprise wiki", and I have the Visio Graphics service application enabled (I have enterprise SP license). Now if I open the document library, and I click on the Visio diagram

enter image description here

the diagram will open inside the browser as intended:

enter image description here

But the problem I am facing is as follow, if I edit a page, add a link, select "chose from SharePoint" and I browse for the Visio drawing as follow:

enter image description here

Then when users click on the link, the Visio diagram will not be shown inside the browser instead an open dialog will be displayed as follow: enter image description here

So can anyone advise how to force the hyperlink to have the same effect as clicking on the diagram from the document library, where the visio drawing will be shown directly inside the browser, instead of prompting an open dialog box ?

2 Answers 2


Well, the way that the library brings up the web view is by rewriting the URL to point to the Visio Web Access page - it does this through JavaScript when you hover over the link. Kind of annoying in SP2010 when I'm trying to get at the actual file, actually :)

Try copying the URL of the Web Access page and using that as your link - I'm not familiar with the Visio Web Viewer but I imagine it's got an argument on the end that specifies the file name (this is how Excel works), so it should be a permanent link.

Hope this helps!


One way to do this automatically might be the following JavaScript, placed either in a content editor in the designated page or included via the master page:

           var currentUrl = el.href;
           var newUrl = "/_layouts/15/VisioWebAccess/VisioWebAccess.aspx?id="+currentUrl;
            el.href = newUrl;

This code will find any url that contains '.vsdx' but not VisioWebAccess and then rewrite them to point to the web viewer.

Depending on how your site works, newUrl might need to pull a web URL from _spPageContextInfo.

  • Yes i could of course copy the URL from the browser when viewing the visio diagram inside the visio web access which look something such as "tservername/kb/ProcessWiki/_layouts/15/VisioWebAccess/…" . but this approach seems very manual , i was searching for more user friendly & standard approach approach.
    – John John
    Commented Dec 2, 2014 at 23:03
  • 1
    Hi John - since these links are just HTML content to SharePoint I don't think there's a way to automatically rewrite the URL, but you could possibly use JavaScript to rewrite the URLs yourself - I edited my answer with an option for this.
    – Ted N.
    Commented Dec 3, 2014 at 20:26
  • i will try your approach ..
    – John John
    Commented Dec 4, 2014 at 0:46

Save Visio file as Web Drawing.

Under Site Settings > Advanced settings Select Open in the browser.

Step by step instruction

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.