In Visio you can set the theme of your Visio File > Options > General > Office Theme. I would like to retrieve this value in my addin in visual studio so that I can adjust my own custom windows. However I can not find this setting. Can somebody tell me where I can find it or how I can access it?
Asked
Active
Viewed 223 times
2
1 Answers
3
You can read the value of the DWORD registry key UI Theme which can be found under:
HKEY_CURRENT_USER\Software\Microsoft\Office\1x.0\Common
Replace the 1x.0 with your Office version number which is currently 15.0 for Office 2013 or 16.0 for Office 2016.
The possible values for Office 2013 are:
0White1Light Grey2Dark Grey
The possible values for Office 2016 are:
0Colorful3Dark Grey4Black (not available in all versions)5White
It's also possible to listen for theme changes using ManagementEventWatcher.EventArrived like shown here: Receive notification when RegistryKey Value was changed