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

VisWebPageSettings.ThemeName Property (Visio Save As Web)

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

Assigns a Web page theme to the page you are creating. Read/write.


expression. ThemeName

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

Return Value



You can use themes that are provided by Microsoft Visio or themes that you create yourself. If you want to create your own theme, do the following:

  1. Create an HTM file that contains the following term in an HTML tag: "##VIS_SAW_FILE##"Visio recognizes HTM files that contain this tag as theme files.

  2. Store the file in the following folder:\ your_Visio_path \ your_language_ID \

Your theme file will then appear in the Host in Web page drop-down list in 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 Microsoft Visual Basic for Applications (VBA) macro shows how to use the ThemeName property to assign the "Basic" theme (supplied by Visio) to the Web page you are creating.

Before running this macro, replace path\filename.htm with a valid target path on your computer and the file name that you want to assign to your Web page. Also, replace your_Visio_path and your_language_ID with the path to Microsoft Visio on your computer, for example:

C:\Program Files\Microsoft Office\Visio14\1033...

Public Sub ThemeName_Example() 
 Dim vsoSaveAsWeb As VisSaveAsWeb 
 Dim vsoWebSettings As VisWebPageSettings 

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

 With vsoWebSettings 
 .ThemeName = "your_Visio_path\your_language_ID\Basic.htm" 
 .TargetPath = "path\filename.htm" 
 End With 

End Sub
© 2018 Microsoft