Themes![]() |
Represents a theme in Microsoft FrontPage. The Theme object is a member of the Themes collection. The Themes collection represents all the themes on the local machine or all themese applied to a specific web. Within the Themes collection, individual Theme objects are indexed beginning with zero.
Use the Format property to return format information for a theme. The following statement returns the format for the theme applied to the active FrontPage-based web page.
myThemeFormat = Theme.Format
Use the Label property to return the name that is displayed in the Theme list box — this is the full name of the theme. The following statement returns the label for the theme.
myThemeLbl = Theme.Label
Use the Name property to return or apply a theme to a web page. The Name property contains the directory name for the theme—an abbreviated version of the name of the theme as displayed in the Theme list box. The following example lists the names of all themes in the themes collection in the body of the active document.
Note To run this example, you must have a web open that has a theme applied to the active page, the entire web, or a file in the web.
Sub ListThemes()
Dim objTheme As Theme
For Each objTheme In Application.Themes
ActiveDocument.body.insertAdjacentText "beforeend", objTheme.Name
Next
End Sub
Use the Version property to return the version number of the theme. The following example returns the version for a theme.
myThemeVersion = Theme.Version