Excel 2007 VBA ApplyTheme Addin
I am trying to set the workbook theme using VBA code.
ActiveWorkbook.ApplyTheme("C:\Users\Chris\AppData\Roaming\Microsoft\Templates\Document Themes\MyTheme.thmx")
This works but I don't know how to create a path to the "Document themes" folder which will for work all users?
Than开发者_开发知识库ks Chris
You can get the user's application data folder using the Environ
function:
Dim themeFolder As String
themeFolder = Environ("APPDATA") & "Microsoft\Templates\Document Themes"
精彩评论