Kommentar
Åtkomst till den här sidan kräver auktorisering. Du kan prova att logga in eller ändra kataloger.
Åtkomst till den här sidan kräver auktorisering. Du kan prova att ändra kataloger.
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
'Declaration
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.