ThemeProperties Property Example
The following example checks the theme properties for active graphics. If active graphics have been applied, then vivid colors are applied in addition to the theme properties that are already applied to the active page window. If active graphics aren't applied, then active graphics and vivid colors are both applied to the active page window.
Private Sub GetThemeProperties()
Dim myPageWindow As PageWindow
Set myPageWindow = ActiveWeb.ActiveWebWindow.ActivePageWindow
If myPageWindow.ThemeProperties(fpThemeActiveGraphics) Then
myPageWindow.AppyTheme (fpThemePropertiesAll + _
fpThemeVividColors)
Exit Sub
Else
myPageWindow.ApplyTheme (fpThemePropertiesAll + _
fpThemeActiveGraphics + fpThemeVividColors)
End If
End Sub
The following example adds a background picture to the specified file.
Private Sub AddBackgroundImage()
Dim myFile As WebFile
Set myFile = Webs(0).Rootfolder.Files("index.htm")
If myFile.ThemeProperties(fpThemeBackgroundImage) = 0 Then
myFile.ApplyTheme myFile.ThemeProperties(fpThemeName), _
myfile.ThemeProperties(fpThemePropertiesAll) + _
fpThemeBackgroundImage
End If
End Sub