DocumentBase.ApplyDocumentTheme(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 a document theme to a document.
public:
void ApplyDocumentTheme(System::String ^ fileName);
public void ApplyDocumentTheme (string fileName);
member this.ApplyDocumentTheme : string -> unit
Public Sub ApplyDocumentTheme (fileName As String)
Parameters
- fileName
- String
The full path of the theme to apply.
Examples
The following code example switches the document theme to the Foundry theme. To use this example, run it from the ThisDocument
class in a document-level project.
private void SwitchToFoundryTheme()
{
this.ApplyDocumentTheme(@"C:\Program Files\Microsoft Office\" +
@"Document Themes 12\Foundry.thmx");
}
Private Sub SwitchToFoundryTheme()
Me.ApplyDocumentTheme("C:\Program Files\Microsoft Office\" + _
"Document Themes 12\Foundry.thmx")
End Sub