---
title: "Visio Viewer macro"
canonical: "https://support.appfire.com/space/CVP/69174057/Visio%20Viewer%20macro"
format: markdown
---
> Macro (aura-html)

This article provides a description of the *Visio Viewer* macro and its parameters.

## <span style="color: #000000">Features</span>

- <span style="color: #000000">Render Visio diagrams from an attachment or a file on the file system, a URL, or a profile</span>
- <span style="color: #000000">Specify advanced Visio control parameters</span>
- <span style="color: #000000">Automatic conversion to SVG image format if Internet Explorer (IE) rendering is not available</span>

## <span style="color: #000000">Basic use</span>

| <span style="color: #000000">**Macro name**</span> | <span style="color: #000000">*Visio Viewer macro*</span> |
| --- | --- |
| <span style="color: #000000">**Macro syntax**</span> | <span style="color: #000000">*{visio}*</span> |

## <span style="color: #000000">Parameters</span>

### <span style="color: #000000">General parameters</span>

| <span style="color: #000000">**Macro browser label**</span> | <span style="color: #000000">**Default**</span> | <span style="color: #000000">**Description**</span> | <span style="color: #000000">**Macro parameter**</span> |
| --- | --- | --- | --- |
| <span style="color: #000000">*Location of the Visio file*</span> | <span style="color: #000000">Most recent Visio file uploaded to the current page</span> | <span style="color: #000000">A required parameter that is equivalent to the default parameter. It specifies the location of the Visio file.</span><br>- <span style="color: #000000">*^attachment*</span><span style="color: #000000"> - Data is read from an attachment on the current page.</span>
- <span style="color: #000000">*page^attachment*</span><span style="color: #000000"> - Data is read from an attachment on the page name provided.</span>
- <span style="color: #000000">*space:page^attachment*</span><span style="color: #000000"> - Data is read from an attachment on the page name provided in the space indicated.</span> | <span style="color: #000000">file</span> |
| <span style="color: #000000">*Profile*</span> |  | <span style="color: #000000">Select the profile name to be used to access the files from a remote location. Profiles contain a basic set of parameters used to access a remote location such as the type of URL, user credentials, and so on. Refer to </span><span style="color: #000000">[this link](https://appfire.atlassian.net/wiki/x/T4IfB)</span><span style="color: #000000"> to know more about creating profiles. </span><br>> ⚠️ - <span style="color: #000000">Contact your Confluence administrator for further information about the profiles available in your instance.</span>
> ⚠️ - <span style="color: #000000">If a profile is specified, it is recommended to provide the relative path to the location of the Visio file to be rendered.</span> | <span style="color: #000000">profile</span> |
| <span style="color: #000000">*URL to Visio file*</span> |  | <span style="color: #000000">Enter the URL to retrieve the Visio file from its actual remote location. Data is read from the specified URL. </span><br>> ⚠️ <span style="color: #000000">Only valid, raw URLs are used in the </span><span style="color: #000000">*URL to Visio file*</span><span style="color: #000000"> parameter.</span> <span style="color: #000000">A raw URL is defined as the part of the URL following the domain information and includes the query string, if present. For example, in the URL string </span>`http://www.contoso.com/articles/recent.aspx`<span style="color: #000000">, the raw URL is </span>`/articles/recent.aspx`<span style="color: #000000">.</span><br>> ⚠️ *Precedence in URL handling*
> ⚠️ 
> ⚠️ <span style="color: #000000">URLs are processed using a fixed precedence explained as follows:</span>
> ⚠️ 
> ⚠️ 1. <span style="color: #000000">If the given URL is linked to a specific application like Bitbucket, GitLab, or GitLab, the macro does not require any user credentials, and processes and renders the given file. Refer to</span> <span style="color: #000000">this article</span> <span style="color: #000000">for information about </span><span style="color: #000000">[application links](https://appfire.atlassian.net/wiki/x/dYMfB)</span><span style="color: #000000">.</span>
> ⚠️ 2. <span style="color: #000000">If </span><span style="color: #000000">*Profile*</span><span style="color: #000000"> is specified, the macro appends the URL given here with the URL specified in the profile configuration, and accesses the location to render the required file.</span>
> ⚠️ 3. <span style="color: #000000">Lastly, if no application links or profiles were given, the URLs are processed as-is and the required file is rendered.</span> | <span style="color: #000000">url</span> |
| <span style="color: #000000">*URL connection timeout*</span> |  | <span style="color: #000000">Enter time in milliseconds to wait until the URL connection disconnects before getting data. Use this to increase time needed for slow connections. Note that if a zero is given, the connection may wait infinitely.</span> | <span style="color: #000000">timeout</span> |
| <span style="color: #000000">*Output type*</span> |  | <span style="color: #000000">Specify the value of </span><span style="color: #000000">*default*</span><span style="color: #000000"> option. Controls how Visio diagrams are displayed. Affects all </span><span style="color: #000000">*Visio Viewer*</span><span style="color: #000000"> macros that do not have a specific output parameter value.</span><br>- <span style="color: #000000">*default*</span><span style="color: #000000"> - Display output as configured by an administrator in </span><span style="color: #000000">[Global configuration](https://appfire.atlassian.net/wiki/x/TYMfB#%5BinlineExtension%5DGlobal-configuration)</span><span style="color: #000000">.</span>
- <span style="color: #000000">*best*</span><span style="color: #000000"> - Display output in an optimal format based on system and browser used. Requires Visio control on Internet Explorer (IE) capable browsers. Use only if conversion support has been installed and enabled in your Confluence instance. Refer to </span>[How to install SVG conversion support](https://appfire.atlassian.net/wiki/x/PYIfB)<span style="color: #000000">.</span>
- <span style="color: #000000">*visio*</span><span style="color: #000000"> - Display output using Internet Explorer Visio control. Requires Internet Explorer (IE) or IE tab capable browser on Windows.</span>
- <span style="color: #000000">*svg*</span><span style="color: #000000"> - Display output as SVG image. Use only if conversion support has been installed and enabled in your Confluence instance.</span> | <span style="color: #000000">output</span> |
| <span style="color: #000000">*Page images to display*</span> |  | <span style="color: #000000">Enter a comma-separated list of pages in the Visio file to be displayed. When the Visio viewer control is used, all the pages of the Visio file are displayed, rather than just the specific pages in the specified list.</span> | <span style="color: #000000">pages</span> |
| <span style="color: #000000">*Message when IE render is not available*</span> |  | <span style="color: #000000">Enter the message to be displayed when Internet Explorer (IE) render is not available to show the diagram. Leave the field empty to display nothing, else a default message is shown.</span> | <span style="color: #000000">ieMessage</span> |
| <span style="color: #000000">*Customize viewer control code*</span> |  | <span style="color: #000000">Enter a code snippet to customize the output of converted images. </span><span style="color: #000000">*For advanced users only!*</span> | <span style="color: #000000">codeBase</span> |
| <span style="color: #000000">*Attachment name for converted page images*</span> |  | <span style="color: #000000">Specify the base name of the image attachment to use, create, or update. The output can be saved to an attachment for converted images only. Example: </span><span style="color: #000000">*visio.svg*</span><span style="color: #000000"> or </span><span style="color: #000000">*space:my page^visio.svg*</span><span style="color: #000000">. </span><br><span style="color: #000000">If the Visio file contains only one page, the attachment takes the file's name. If the Visio has more than one page, then </span><span style="color: #000000">*#1*</span><span style="color: #000000">, </span><span style="color: #000000">*#2*</span><span style="color: #000000">, etc... is appended to the end of the base name.</span> | <span style="color: #000000">attachment</span> |
| <span style="color: #000000">*Attachment version*</span> |  | <span style="color: #000000">Specify how the generated page images are treated as an attachment. The options are as follows:</span><br>- <span style="color: #000000">*new*</span><span style="color: #000000"> - a new attachment version is created every time the page is rendered. Consider using the</span> [Cache Macro](https://appfire.atlassian.net/wiki/x/VwP4Aw)<span style="color: #000000"> with this option.</span>
- <span style="color: #000000">*replace*</span><span style="color: #000000"> - the attachment is first removed and then replaced every time the page is rendered.</span>
- <span style="color: #000000">*keep*</span><span style="color: #000000"> - an existing attachment is used if available. The attachment is regenerated only if it is removed by some other mechanism.</span> | <span style="color: #000000">attachmentVersion</span> |
| <span style="color: #000000">*Attachment comment*</span> |  | <span style="color: #000000">Enter a comment to be used when the attachment is created or updated.</span> | <span style="color: #000000">attachmentComment</span> |

### <span style="color: #000000">Visio viewer control parameters</span>

<span style="color: #000000">These parameters are passed to the Visio control itself. Refer to the numerous Visio Control and similar documentation for more details. For example, view</span><span style="color: #091e42"> </span>[Visio 2003 Control](http://msdn.microsoft.com/en-us/library/aa168474%28v=office.11%29.aspx) <span style="color: #000000">related articles.</span>

| **Macro browser label** | **Default** | **Description** | **Macro parameter** |
| --- | --- | --- | --- |
| <span style="color: #000000">*Width of diagram*</span> | <span style="color: #000000">*100%*</span> | <span style="color: #000000">Enter the width to be used for the Visio diagram in pixels or percent (</span><span style="color: #000000">*%*</span><span style="color: #000000">).</span> | <span style="color: #000000">width</span> |
| <span style="color: #000000">*Height of diagram*</span> | <span style="color: #000000">*700*</span> | <span style="color: #000000">Enter the height to be used for the Visio diagram in pixels.</span> | <span style="color: #000000">height</span> |
| <span style="color: #000000">*Background color*</span> | <span style="color: #000000">*white*</span> | <span style="color: #000000">Enter the background color to be used for the diagram.</span> | <span style="color: #000000">bgColor</span> |
| <span style="color: #000000">*Page color shown in page view*</span> | <span style="color: #000000">*silver*</span> | <span style="color: #000000">Enter the color for the page to be used when the diagram is shown in page view.</span> | <span style="color: #000000">pageColor</span> |
| <span style="color: #000000">*Show Visio page view*</span> | <span style="color: #000000">false</span> | <span style="color: #000000">Enable this option to show Visio page view.</span> | <span style="color: #000000">pageView</span> |
| <span style="color: #000000">*Show grid in page view*</span> | <span style="color: #000000">false</span> | <span style="color: #000000">Enable this option to show the Visio diagram in a grid on page view.</span> | <span style="color: #000000">grid</span> |
| <span style="color: #000000">*Show page tabs*</span> | <span style="color: #000000">false</span> | <span style="color: #000000">Enable this option to show Visio page tabs.</span> | <span style="color: #000000">pageTabs</span> |
| <span style="color: #000000">*Initial page to show*</span> | <span style="color: #000000">*0*</span> | <span style="color: #000000">Enter the initial page number of the Visio diagram to be shown. The page at which the diagram was saved is shown, by default.</span> | <span style="color: #000000">pageIndex</span> |
| <span style="color: #000000">*Show diagram show bars*</span> | <span style="color: #000000">false</span> | <span style="color: #000000">Enable this option to show scroll bars within the rendered Visio diagram.</span> | <span style="color: #000000">scrollBars</span> |
| <span style="color: #000000">*Show toolbar*</span> | <span style="color: #000000">false</span> | <span style="color: #000000">Enable this option to show the Visio Viewer control toolbar.</span> | <span style="color: #000000">toolbar</span> |
| <span style="color: #000000">*Show viewer control with right click*</span> | <span style="color: #000000">true</span> | <span style="color: #000000">This option enables the display of Visio Viewer control menu when right-clicking the diagram. Disable the option if access to the Visio Viewer control is to be disallowed.</span> | <span style="color: #000000">contextMenu</span> |
| <span style="color: #000000">*Show property dialog in menu*</span> | <span style="color: #000000">true</span> | <span style="color: #000000">This option enables the display of the Properties dialog from the context menu. Disable the option to hide the diagram properties.</span> | <span style="color: #000000">propertyDialog</span> |
| <span style="color: #000000">*Zoom value*</span> | <span style="color: #000000">*-1*</span> | <span style="color: #000000">Specify a zoom percentage as a fraction (for example, </span><span style="color: #000000">*0.5*</span><span style="color: #000000"> for 50% and </span><span style="color: #000000">*1.0*</span><span style="color: #000000"> for 100%), or use any of the following values:</span><br>- <span style="color: #000000">*-1*</span><span style="color: #000000">: Whole page view (default option)</span>
- <span style="color: #000000">*-2*</span><span style="color: #000000">: Page width view</span>
- <span style="color: #000000">*-3*</span><span style="color: #000000">: Last zoom percentage</span> | <span style="color: #000000">zoom</span> |
| <span style="color: #000000">*Show in highest quality*</span> | <span style="color: #000000">true</span> | <span style="color: #000000">This option enables the display of the diagram in the highest quality. Note, the higher the quality, the longer it takes to display the diagram.</span> | <span style="color: #000000">highQuality</span> |
| <span style="color: #000000">*Show viewer control errors*</span> | <span style="color: #000000">true</span> | <span style="color: #000000">This option displays the Visio Viewer control errors, if any. Disable to hide all errors.</span> | <span style="color: #000000">alerts</span> |

# <span style="color: #000000">Additional links</span>

- <span style="color: #000000">[How to use URLs with Visio Viewer macro to render Visio files](https://appfire.atlassian.net/wiki/x/6YEfB)</span>
- <span style="color: #000000">[Create a profile with a URL](https://appfire.atlassian.net/wiki/x/T4IfB)</span>
- <span style="color: #000000">[Create a profile integrated with Microsoft OneDrive](https://appfire.atlassian.net/wiki/x/iIMfB)</span>