WorkbookBase.ApplyTheme(String) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Applies the specified theme to the workbook.
public:
void ApplyTheme(System::String ^ filename);
public void ApplyTheme (string filename);
member this.ApplyTheme : string -> unit
Public Sub ApplyTheme (filename As String)
Parameters
- filename
- String
The full file path of the theme to apply.
Examples
The following code example switches the workbook theme to the Foundry theme.
This example is for a document-level customization.
private void SwitchToFoundryTheme()
{
this.ApplyTheme(@"C:\Program Files\Microsoft Office\" +
@"Document Themes 12\Foundry.thmx");
}
Private Sub SwitchToFoundryTheme()
Me.ApplyTheme("C:\Program Files\MicrosoOffice\" _
+ "Document Themes 12\Foundry.thmx")
End Sub