开发者

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"
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜