Outlook Add-in : How to apply Windows XP themes to Office COM Add-ins?

When you create a COM add-in for a Microsoft Office program, the appearance of that add-in will conform by default to the standard Office appearance. However, with Microsoft Windows XP, you can choose from a number of visual styles (or themes) to customize the appearance of a Microsoft Windows program.

Unless Windows themes are explicitly enabled for a COM add-in, the appearance of the add-in does not change with these color schemes, leading the add-in to appear dated or out-of-synch with the program where it is contained. With the Microsoft Visual C++ or the Microsoft Visual Studio .NET languages, you can enable your COM add-in to opt-in to Windows themes.

When you enable an add-in for Windows themes, the themes affect only the appearance of the add-in. The functionality of the add-in is not affected.

Add-ins created with,

  • MS Visual Basic 6.0: Visual Basic 6.0 does not support themes. Add-ins cannot be themed by using Visual Basic 6.0.
  • MS Visual C++ 6.0 : To use Visual C++ 6.0 to enable a COM add-in to opt-in to Windows XP themes, please read the following code snippet.
  • MS Visual Studio.Net and managed languages: To use Visual Studio .NET and the .NET Framework to enable Windows XP themes for a COM add-in, please follow these steps.

For more detailed information, please go through the following KB article. If you need more details about how to use Windows XP visual styles (themes), you can visit the following Microsoft MSDN Web site: https://msdn2.microsoft.com/en-us/library/ms997646.aspx