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

VisWebPageSettings.GetFormatName Method (Visio Save As Web)

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

Places the friendly name of the output format specified by the index passed to this method in the pVal parameter passed to the method.


expression. GetFormatName( nIndex, pVal)

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


NameRequired/OptionalData TypeDescription
nIndexRequiredLongThe zero-based index of the output format within the list of output formats on the user's computer.
pValRequiredStringVariable that will hold the display name of the output format. The GetFormatName method places the name in this variable.

Return Value



You can view the available output formats in the Save as Web Page dialog box. (On the File menu, click Save As Web Page, click Publish, and then click Advanced).

You can determine the total number of formats by examining the FormatCount property. The formats include all those installed on the user's computer (for example, XAML, VML, JPG, GIF, PNG, and so on). To view a list of formats, see the topic for the ListFormats method.


The following example shows how to use the GetFormatName method to determine the display name of the output format being passed to the method.

Public Sub GetFormatName_Example() 
 Dim vsoSaveAsWeb As VisSaveAsWeb 
 Dim vsoWebSettings As VisWebPageSettings 
 Dim strName As String 

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

 vsoWebSettings.GetFormatName(1, strName) 

 Debug.Print strName 
End Sub
© 2018 Microsoft