Table of contents
Collapse the table of content
Expand the table of content

VisWebPageSettings.SecFormat Property (Visio Save As Web)

office 365 dev account|Last Updated: 6/12/2017
1 Contributor

Specifies the secondary output format for the Web page. Read/write.


expression. SecFormat

_expression_An expression that returns a ** VisWebPageSettings** object.

Return Value



The secondary output format is used if the browser does not support the primary output format. For example, if the primary format is XAML and the required Silverlight browser plug-in is not installed, the Web page output uses the secondary format.

The primary output format is specified by the PriFormat property. For information about which browsers are compatible with selected formats, see the AltFormat property.

Possible values for the SecFormat property are as follows:

  • PNG (Portable Network Graphics), the default

  • JPG (JPEG File Interchage Format)

  • GIF (Graphics Interchange Format)

This value corresponds to the value selected in the list below the Provide alternate format for older browsers check box (if it is selected) on the Advanced tab of the Save as Web Page dialog box (click the BackstageButton tab, click Save As, in the Save as type list, select Web Page (.htm;.html), click Publish, and then click Advanced).


The following macro shows how to use the SecFormat property to set the secondary format value to JPG for browsers that do not support the primary format of XAML (the default).

Before running this macro, replace path\filename.htm with a valid target path on your computer and the filename that you want to assign to your Web page.

Public Sub SecFormat_Example() 
 Dim vsoSaveAsWeb As VisSaveAsWeb 
 Dim vsowebSettings As VisWebPageSettings 

 Set vsoSaveAsWeb = Visio.Application.SaveAsWebObject 
 Set vsoWebSettings = vsoSaveAsWeb.WebPageSettings 

 With vsoWebSettings 
 .AltFormat = True 
 .SecFormat = "JPG" 
 .TargetPath = "path\filename.htm" 
 End With 

End Sub
© 2018 Microsoft