VisWebPageSettings.ThemeName property
Assigns a webpage theme to the page that you are creating. Read/write.
Syntax
expression.ThemeName
expression An expression that returns a VisWebPageSettings object.
Return value
String
Remarks
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:
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.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 (BackstageButton tab > Save As > Save as type list > Web Page (*.htm;*.html) > Publish > Advanced).
Example
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 webpage that 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 webpage. 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
vsoSaveAsWeb.CreatePages
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.