I have been asked by a colleague to publish my hack for enabling Visio files to be viewed by everyone with the Visio for the Web component in reading mode on this website, or indeed any other public web site. So, here goes ….
The first thing is to view the Visio file in an online browser. The file must be stored in OneDrive (or SharePoint Online if permission for guests available). The View online option is available from the right mouse menu of a selected Visio file, if viewing in Windows Explorer, or simply open the file, if listed in the browser. Note the “…” (More Commands) button in the top right corner.
Secondly, get the Embed code, of the desired Width and Height, for the Visio document, and paste it into Notepad, or similar.
It will look something like this:
Thirdly, Copy Link for a view only Share and paste that into Notepad, or similar.
It will look something like this:
Simply replace the source document part of the html code with the view only link.
Then copy this modified code into a Custom HTML block, and hey presto!
The diagram, by the way, is from an upcoming presentation that I, and my French MVP friend, Michel Laplane, will be giving about embedding Visio diagrams within SharePoint and Teams soon. Look out for Microsoft Ignite the Tour cities and dates… and webcasts and articles….
David Short says
Hi David
Great tip..thanks..
Is it possible to remove the navigation features such as zoom, pan and page tabs as part of the embed process?
I’m trying to move away from classic view and the old Visio webpart- but this gives much greater out of the box configuration than the Modern page options
David Parker says
Well, the Visio JavaScript API does provide this ( Visio.Application class ShowToolbar ) does provide this. I have done it in SharePoint pages but not tried in public non-SharePoint pages….
Glenn Tracy says
Great article David.
I am having a problem with embedded objects in my Visio diagram being lost when I save the drawing to Teams. It happens as well when I try and send it to someone in the corp using Outlook. I’ve been using embedded objects in Visio for many years and have not seen this issue before.
Also, when I select the visio object in visio the icon changes and never returns to the icon I selected for it.
I would very much like to see your presentation. Is it online?
Thanks.
David Parker says
Our Microsoft Ignite Tour got cut short by the pandemic 🙁 I did present in Copenhagen just before lockdown … so I have made them available to view https://bvisual.net/2021/12/02/visio-presentations-for-the-microsoft-ignite-the-tour-2020/
Are you embedding Visio documents in other Visio documents?
Elías Patiño says
Hello, Im trying to embed a diagrama to my Sharepoint site, but it only displays the exact plain code..
Im following the same steps and still doesn´t work, how can I solve this?
David Parker says
If you are using SharePoint webpages, then you can use the File Viewer component of your file is stored in SharePoint or OneDrive