Change Office Theme (White, Colorful, Dark Gray, etc.) via VBA? RRS feed

  • Question

  • Is there a way to change the Office Theme via an Office macro or VBA script? I'm referring to the setting that is available in Word (for example) with File->Options->General->Office Theme (which leads to a dropdown menu).

    If I try to record a macro in which I change the Office Theme, the resulting macro is empty. Is there any other automated method?

    Saturday, April 2, 2016 3:02 PM

All replies

  • If you are talking about the Theme in Page Layout then the below code can be use.

    Sub ChangeTheme()
        ActiveWorkbook.ApplyTheme ( _
            "C:\Program Files\Microsoft Office\Document Themes 15\Facet.thmx")
        ActiveWorkbook.Theme.ThemeColorScheme.Load ( _
            "C:\Program Files\Microsoft Office\Document Themes 15\Theme Colors\Office 2007 - 2010.xml" _
    End Sub



    Sunday, April 3, 2016 12:37 PM
  • Thank you, but no, I was not asking about the document theme, but the "Office Theme" accessible through the menu I described: File->Options->General->Office Theme

    This is completely different from the document theme, and affects the color of the menus, Ribbon, dialog boxes, background (in Word and PowerPoint). It has absolutely no effect on the color of the document itself, which is one of the things affected by the document theme.

    Is there a programmable way to change the Office Theme?

    Sunday, April 3, 2016 12:45 PM
  • Hi Mendelson,

    >>Is there a programmable way to change the Office Theme?

    No. There is no such Office object model we can change the Office theme. A possible way, you can try using the tools like "ProcessMonitor" to track whether this configuration is stored in the registry.

    And if you want Office to support this in Office object model, you can submit the feedback from link below:

    Regards & Fei

    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, April 22, 2016 6:01 AM