Theme Object

See Also         Properties                 

Application object
Webs object
Web object
Themes collection (Themes)

Represents a theme in Microsoft FrontPage. The Theme object is a member of the Themes collection. The Themes collection represents all of the themes on the local machine or applied to a specific web. Within the Themes collection, individual Theme objects are indexed beginning with zero.

Using the Theme Object

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 returns the name of the theme associated with the ActivePageWindow object.

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.

Private Sub GetThemeName()
Dim myPageWindow As PageWindow
Dim myThemeName As String

Set myPageWindow = ActivePageWindow
myThemeName = myPageWindow.Theme.Name
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