次の方法で共有


WorkbookBase.ApplyTheme(String) Method

Definition

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

Applies to