Fixing Code Compatibility Issues with Office 2010 Compatibility Inspector

The Microsoft Office 2010 Compatibility Inspector compares existing (legacy) code against the Office 2010 object model by using a text search for known properties and methods that have changed. You can run the tool against specific projects. You also have the option to mark those areas in the code where text search has identified a possible object model match. The comment will include description of what was found along with possible remediation link to online content or help.

The key features of the Office Code Compatibility Inspector include the following:

  • It consists of four add-ins that load, one add-in per application, in Excel 2010, PowerPoint 2010, Word 2010, and Visual Studio 2008.
  • It runs on a per-user or a per-document basis. For VBA, users open a document and run the tool from the Developer tab. For Visual Studio projects, the developer runs the tool from the Tools menu.
  • It adds comments in the code where it finds other potential issues.
  • It displays a summary and a detailed report of its findings after it completes its inspection.

The tool integrates with both Microsoft Visual Basic for Applications 7.0 (VBA 7) and Microsoft Visual Studio 2008. It includes a basic scanner where definitions and remediation links are updated from a central online location. It also generates a summary report and a details report. The summary includes the total lines of code scanned as well as total lines identified as potential candidates for object model changes. The details report includes the module name, line number, and links to remediation for each identified issue along with color-coded flags for impact guidance.

You cannot use this tool to inspect code from Microsoft Outlook or Microsoft Access. However, you can use the tool to inspect Excel, PowerPoint, and Word code for interaction with the Outlook object model.

This tool checks Compatibility for code written for the older Office applications (Office 97, 2000, XP, 2003 and 2007) for use with Microsoft Office 2010.

Download the Office 2010 Tool: Compatibility Inspector to begin with!

Double click the exe, it will show you a path where you will need to extract the installer. Once done, you will have a msi file. While Installing this msi file, you will get an option to select the addins which you want to install.

Component Installation - Compatibility Inspector

Once the installation is complete, this will dump all the required files to the Program Files folder. (Note, you do not have shortcuts to invoke for this tool.)

To invoke this tool, launch any office application. For example, I will start the Microsoft Excel.

Once you do so, you will get an addin installation dialog. Surprisingly, the addins gives an unknown publisher for an inhouse Microsoft Tool.

Excel addin Installation - Compatibility Inspector

You will need to enable this addin, so that it appears in the Ribbon menu control. For doing so, goto File Menu->Options-> Customize Ribbon. You will see that the Developer checkbox is un-checked. Select the checkbox (as shown in the below snapshot).

Enabling the Developer Addin - Compatibility Inspector

Once this is done, you will see a new Developer Menu appearing in the Ribbon controls.

Developer Addin Menu Appears - Compatibility Inspector

Now you can inspect your VBA project for Office 2010 Compatibility. You can select these options (as shown in the screenshot below) while running your code inspection. This tool checks compatibility for code written for the legacy Office applications (Office 97, 2000, XP, 2003 and 2007) for use with Microsoft Office 2010.

Inspect VBA code Project using Office 2010 Compatibility Inspector

At the end of the inspection, you will get a summary report on the scanned, depecated, changed and redesigned items.

Office 2010 Compatibility Inspector Report

You can also inspect a Visual Studio Code for its compatibility, All you need to do is., to enable the addin, Open the solution that you want to inspect in Visual Studio Tools for Office, On the Tools menu, click on Inspect VSTO code.

If the Inspector finds Changed, Deprecated, or Redesigned items in your code, you must debug your code and resolve any issues. As you debug your code, check for Office Code Compatibility Inspector comments above the lines that break your code. Those comments should help you to determine the underlying problem with that particular line of code.

I would also recommend you download and use the Assesment Tool (OEAT) to assess your machine for Office 2010 installation and Addin Compatibility.

This is a comprehensive Environment scanning tool (OEAT) for use in deploying Microsoft Office 2010.  This tool (along with documentation) assists a customer in the assessment phase of deployment. It identifies:

  • Currently installed applications and installation environment
  • Add-ins currently in use by Office clients
  • Programs that are not registered as add-ins but still interact with Office programs
  • Provides a report on the Environmental assessment (potential upgrade issues)
  • Also reports the  Add-ins assessment–list of third party programs and information about the compatibility of those programs with Microsoft Office 2010


Leave a comment

Your email address will not be published.