Hello. I've got Excel file generated by third party software, which sets Office 2007-2010 color scheme. I want to select 'new' Office theme with VBA, but code returns empty.
I can change it manually and it works (on Excel ribbon :
-->
But when I record a macro the file to load is empty
When selecting from ribbon old color scheme - everything looks fine:
-->
Selecting default theme also does not select correct default color scheme
but it doesn't change color scheme to Office 2013 or later.
And to make things harder I cannot supply many users, that use the macro with my custom xml file.
I've had a solution somewhere on the web, but sadly I lost it. There was something in the 'ActiveWorkbook.Theme.ThemeColorScheme.Load' code that didn't require physical file on the hard drive.
I can change it manually and it works (on Excel ribbon :
But when I record a macro the file to load is empty
VBA Code:
ActiveWorkbook.Theme.ThemeColorScheme.Load()
When selecting from ribbon old color scheme - everything looks fine:
Code:
ActiveWorkbook.Theme.ThemeColorScheme.Load ("C:\Program Files\Microsoft Office\root\Document Themes 16\Theme Colors\Office 2007 - 2010.xml")
Selecting default theme also does not select correct default color scheme
Code:
ActiveWorkbook.ApplyTheme ("C:\Program Files\Microsoft Office\root\Document Themes 16\Office Theme.thmx")
but it doesn't change color scheme to Office 2013 or later.
And to make things harder I cannot supply many users, that use the macro with my custom xml file.
I've had a solution somewhere on the web, but sadly I lost it. There was something in the 'ActiveWorkbook.Theme.ThemeColorScheme.Load' code that didn't require physical file on the hard drive.