Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
Applies the specified theme to the workbook.
Namespace: Microsoft.Office.Tools.Excel
Assembly: Microsoft.Office.Tools.Excel.v4.0.Utilities (in Microsoft.Office.Tools.Excel.v4.0.Utilities.dll)
Syntax
Public Sub ApplyTheme ( _
filename As String _
)
public void ApplyTheme(
string filename
)
Parameters
filename
Type: System..::.StringThe 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 Sub SwitchToFoundryTheme()
Me.ApplyTheme("C:\Program Files\MicrosoOffice\" _
+ "Document Themes 12\Foundry.thmx")
End Sub
private void SwitchToFoundryTheme()
{
this.ApplyTheme(@"C:\Program Files\Microsoft Office\" +
@"Document Themes 12\Foundry.thmx");
}
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.