Nov 23 2016
- last edited on
Nov 08 2021
Note that these APIs are not applicable for Office Add-ins Platform.
If you have any questions, feel free to drop a comment below or mail to TellVisio [at] Microsoft [dot] com
Visio Product Team
Feb 18 2018 11:48 AM
Feb 19 2018 02:25 AM - edited Feb 19 2018 02:27 AM
Regarding the issues faced, you can change the styling of the iframe by getting the iframe element through it's id and applying the properties. Something like
As scroll bars help the user in panning the diagram, you can hide the scroll bars, by disabling the pan capability by calling the below API.
document.view.disablePan = true;
Rahul Mittal | Microsoft Visio
Feb 21 2018 01:03 PM
Thanks for your help. But there is still some issues, i would like to remove the white margins so the image fills up the whole space, and to completely remove the iFrame´s border .
Feb 23 2018 11:55 PM
You could try the below options to get rid of the extra space and borders.
1. If your diagram canvas has white space, please use 'Fit to Drawing' option available in Visio Desktop. See attached.
2. Use the document.view.hideDiagramBoundry = true; to hide the diagram boundary.
3. Change the width/height of the iFrame to fit your drawing page, by using the below code during initialization:
var session = new OfficeExtension.EmbeddedSession(
4. There is an API under development for completely hiding the iFrame borders. application.showBorders = false;
The API should be available by March and you could check this page for updates related to this API.
Mar 19 2018 02:46 AM
I'm using Visio Online inside Sharepoint page (classic): script editor web part, iframe .....
In IE11 there this error in console:
SCRIPT70: Permission denied
Everythins seems to be working but whats that error?
Mar 19 2018 10:42 PM
Sorry that you faced this. Would you be able to provide the code snippet where you are seeing this console error?
You can also use tellVisio [at] microsoft [dot] com for providing more details regarding this or any other feedback that you have related to the Visio Online APIs.
Rahul Mittal | Program Manager | Microsoft Visio
Jul 23 2018 06:54 AM
Are there any plans for the API to work on web parts on modern pages and more specifically be able to do web part connections...send shape data to, highlight shapes from, choice filters etc
Example - Looking to create SharePoint pages where a user can select a shape from the visio web part (process flow chart) and that will filter the document library web part to show the documents corresponding to the step within the process. This works with the shape data value corresponding to a column value in the document library.
The API will work on classic pages...any sign of when this will be available in MODERN?
Aug 29 2018 05:42 PM
Please refer to my blog post on embedding Visio files on a SharePoint page - hope it helps and makes life easier.
Oct 04 2018 04:54 AM
You can check the source code here:
And I have a blog post with some details here:
Any feedback is welcome.
Oct 18 2020 10:48 PM
Hello @Rahul.Mittal ,
The link you mentioned in the above post regarding API doesn't exists anymore. Could you please share the latest links of API's.
I am very new to Visio online.
I am using Embed web part on Modern Site to show Visio file .I need to hide the header and footer of it.
Would you like to put some highlights on it, how can I achieve it?