VisWebPageSettings.GetFormatName method

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

Syntax

expression.GetFormatName (nIndex, pVal)

expression An expression that returns a VisWebPageSettings object.

Parameters

Name Required/Optional Data type Description
nIndex Required Long The zero-based index of the output format within the list of output formats on the user's computer.
pVal Required String Variable that will hold the display name of the output format. The GetFormatName method places the name in this variable.

Return value

Nothing

Remarks

You can view the available output formats in the Save as Web Page dialog box (File menu > Save As Web Page > Publish > 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.

Example

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

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.