Applies the value contained in the ThemeName argument to the property named in the ThemeProperties argument. For example, a theme can be applied to WebFile, PageWindow, or Web objects in a Microsoft FrontPage-based web.
Syntax
expression.ApplyTheme(ThemeName As String, ThemeProperties As FpThemeProperties)
expression An expression that returns an FrontPage object.
ThemeName Required String. A string that contains the name of the theme that you want to apply to a file. Can be one of the following ThemeName constants.
| artsy | boldstri | indust | sumipntg |
| blank | capsules | ricepapr | |
| blends | citrus | rmnsque | |
| blueprnt | expeditn | strtedge |
ThemeProperties Required Long. The ThemeProperties argument takes the enumerated types shown in the following table.
| Enumerated Type | Default Value |
|---|---|
| FpThemeActiveGraphics | &H10 or 16 |
| FpThemeBackgroundImage | 1 |
| FpThemeCSS | &H1000 or 4096 |
| FpThemeDefaultSettings | &H1000000 or 16777216 |
| FpThemeName | &H2000000 or 33554432 |
| FpThemeNoBackgroundImage | 0 |
| FpThemeNoCSS | 0 |
| FpThemeNormalColors | 0 |
| FpThemeNormalGraphics | 0 |
| FpThemePropertiesAll | &H1111 or 4369 |
| FpThemePropertiesNone | 0 |
| FpThemeVividColors | &H100 or 256 |
Remarks
The following code applies the "Sumi Painting" theme to a file with active graphics.
Dim strTheme As String
strTheme = "sumipntg"
Call WebFile.ApplyTheme(strTheme, fpThemeUseActiveGraphics)
To change more than one Theme property when applying the theme, use the plus sign (+), as shown in the following example.
strTheme = "sumipntg"
WebFile.ApplyTheme(strTheme, _
fpThemeVividColors + fpThemeActiveGrphics)
This method is essentially the same one you'd use for applying a theme to a PageWindow or Web object.