Application Compatibility for Microsoft Office 2010

(post courtesy Natalia Efimsteva)

Office 2010 provides a better productivity experience than previous versions. Evaluating the compatibility of existing hardware, Office documents, add-ins, and line-of-business applications is an important part of planning an Office 2010 deployment.

In the first part of this post we will have quick overview of new compatibility toolkits provide by Microsoft, and in the second part focus on x64 platform compatibility.

Toolkits

Microsoft provides several tools, programs and guidance for compatibility assessment:

  1. Office 2010 ISV Application Compatibility Visibility Program
  2. Office Migration Planning Manager (OMPM) – updated
  3. Office Environment Assessment Tool New!
  4. Office 2010 Compatibility Inspector Tool New!
  5. Application Compatibility Guide

clip_image001

All compatibility areas are getting addressed by the full set of tools and programs:

  • Feature-function change → Compatibility Inspector
  • ISV applications → OEAT
  • Add-in compatibility → OEAT
  • Maintenance/migration of macros → Compatibility Inspector
  • Maintenance/migration of scripts → Compatibility Inspector
  • Document fidelity → OMPM

Office 2010 ISV Application Compatibility Visibility Program

Office 2010 ISV Application Compatibility Visibility Program is new program which tracks independent software vendors who pledge that their products are compatible with Office 2010 (something like Windows 7 Logo program). OEAT (about which we will talk later) also uses this list to highlight known compatible add-ins and report them as compatible.

Office Migration Planning Manager

Office Migration Planning Manager is a collection of tools which provide detailed information regarding potential file format/document compatibility issues before migration. You can use the tools in OMPM to scan Office 97 through Office 2003 files for conversion issues or to convert older Office files into the Office 2010 file formats. OMPM checks file properties and contents to help you analyze the environment and determine any issues that you might experience converting from Microsoft Office versions 97 through 2003 file formats to Office 2010 file formats. And OMPM can macros for 32-bit versus 64-bit compatibility (new feature).

Assess the compatibility of Office documents for migration to Office 2010:

1. Create a database for OMPM where all aggregated and extracted information will be stored.

Command

CreateDB.bat <SQL Server Name> <Database Name>

clip_image003

2. Specifying the Scanner Configuration.

Analyze offscan.ini configuration file.

clip_image004

3. Executing and verifying the scan.

clip_image006

clip_image007

4. Importing scan data into OMPM database.

Command

ImportScans.bat <SQL Server Name> <Database Name> <File Path To Scan Report>

clip_image009

5. Analyze reports.

Open consolidated Access database which connected to SQL Server database which now contains scan data. In Issue Summary tab you can review the scan results issue summary results classified in Green, Yellow, and Red types.

clip_image010

In Scanned Files tab you can review the list of scanned files and you can find information about files which contains different issues (for example, embedded versions which are no longer supported). And you these issues must be addressed prior to conversion.

clip_image011

In Macro Summary tab you can review the list of scanned files with macros. The columns Function Issues indicate the count of the number of potential functional issues due to object model changes in the macro project. The x64 Function Issues column is the count of the macros with potential functional issues if used with 64 bit Excel. Problematic files must be examined in detail using the OCCI tool to determine the specific issues.

clip_image012

Office Environment Assessment Tool

Office Environment Assessment Toolis a comprehensive environment scanning tool. This tool assists a customer in the assessment phase of deployment. It identifies the following:

  • 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.
  • Report: Environmental assessment (potential upgrade issues).
  • Report: Add-ins assessment—list of third party programs and information about the compatibility of those programs with Microsoft Office 2010.

OEAT is a user-mode tool. This means that it cannot be run in a system context, with a system account, or as a service. Some of the information that OEAT collects requires administrative rights on the local computer. Therefore, the user account that runs OEAT must belong to the Administrators group on the local computer on which it is run.

Provide an initial compatibility assessment for Office Add-Ins:

1. Configure OEAT settings.

clip_image014

2. Copy OEAT.exe and Settings.xml to computes you are going to scan. Run scanning process.

clip_image015

3. Get reports after scan. Reports are compiled into Excel workbook.

clip_image016

clip_image017

4. Analyze results.

Open the AddinsNotShippedWithOffice sheet in the workbook.

clip_image019

clip_image020

Review the list of discovered add-ins. The Compatibility column indicates if the add-in is a known add-in in the Office TechNet vendor compatibility list. Partial Match indicates an add-in from that vendor was found but not the exact version matches. Focus on the add-ins with Partial and Unknown matches for follow-on research and testing in a productive deployment.

Office 2010 Compatibility Inspector Tool

Office 2010 Compatibility Inspector Tool compares existing (legacy) code against the Office 2010 object model by using a text search (patterns) for known properties and methods that have changed. 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. Compatibility Inspector also scans declaration statements for 64-bit compatibility.

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.

Identify code that maybe affected by object model changes: 32 bit Declare, ActiveX Controls, and external type libraries contained within an Excel, PowerPoint, or Word document:

1. Configuring the Trust Center to provide OCCI VBA Project access.

Excel → File → Options → Trust Center → Macro Settings → Trust access to the VBA project object model

clip_image021

2. Display the Developer tab.

Excel → File → Options → Customize Ribbon

clip_image022

3. Install the OCCI add-in.

Run setupocci.msi

clip_image023

clip_image024

clip_image025

4. Inspecting VBA code.

Open Excel file which contains macros. Developer tab → Inspect VBA Code → Inspect.

clip_image026

5. Analyze OCCI scan results.

Total lines scanned – total number of VBA code lines scanned in the document.

Total items found – total number of problematic items that the Inspector found in the code, including Declare statements to update, changed items, deprecated items, and items affected by design changes.

Deprecated items – items in the code that were removed from the object model, or are no longer supported in it. If your code is dependent on a deprecated item, you must rewrite that portion of the code.

Changed items – items in the code that use a command whose syntax has changed. If your code uses outdated syntax, you must update the code.

Redesigned items – items in the code whose syntax is the same and still exists, but whose updated design might yield unexpected results against your code. For example, formatting a particular text box might have changed because of new text services, and as a result, your code might create a text box, but the layout of the text in the box might be different from previous versions.

Declare statements – total number of Windows API statements detected in the VBA code and then updated for 64-bit compatibility by adding the PTRSAFE keyword.

clip_image028

The OCCI detailed report provides the same information as the summary dialog, but also much more specific information about the VBA Project.

The report includes:

  • VBA Project References to external Type Libraries (ActiveX)
  • Information about each VBA code module found, including the function, line, object model compatibility type, actual line of code, and the URL to the ORK Object Model change reference

clip_image030

OCCI writes a VBA code comment in an XML format above each line of code that contains an object model reference that matches a known change.

The presence of these comments does not necessarily mean that the line of code will cause an error or other issue. OCCI detects that there was a change, and is providing an indication the code contains a change. However, if during code testing problems occur, OCCI code comments provide indications of possible causes.

In analyzed Excel from the Developer tab click Visual Basic and select required code module.

clip_image032

Application Compatibility Guide includes different guidance and manuals which are available on MSDN and TechNet.

Office 2010 x64 compatibility

The Microsoft Office 2010 system is available in both 32-bit and 64-bit versions (new! ). The 64-bit version enables you to work with much larger sets of data. This need is especially true when working with large numbers in Microsoft Excel 2010.

Data Execution Prevention

Microsoft Office 2010 has a new security feature, Data Execution Prevention (DEP, read Data Execution Prevention in Office 2010), which prevents badly-written code from running that can harm your computer. When an add-in that is not designed to function in a DEP-enabled environment tries to run, the Office program that you are using stops working (crashes), and an error message appears after the program restarts. DEP cannot be disabled on 64-bit.

Microsoft Visual Basic for Applications 7.0 (VBA 7)

With the introduction of the new 64-bit version of Microsoft Office 2010, a new version of Microsoft Visual Basic for Applications (VBA), known as Microsoft Visual Basic for Applications 7.0 (VBA 7), is being released to work with both 32-bit and 64-bit applications.

In VBA 7, you must update existing Windows Application Programming Interface (API) statements (Declare statements) to work with the 64-bit version. Additionally, you must update address pointers and display window handles in user-defined types that are used by these statements. This is discussed in more detail in this article as well as compatibility issues between the 32-bit and 64-bit versions of Office 2010 and suggested solutions.

COM objects and ActiveX

You need to update COM objects or recompile them. Native 64-bit processes in Office 2010 cannot load 32-bit binaries. This includes the common controls of MSComCtl (TabStrip, Toolbar, StatusBar, ProgressBar, TreeView, ListViews, ImageList, Slider, ImageComboBox) and the controls of MSComCt2 (Animation, UpDown, MonthView, DateTimePicker, FlatScrollBar).These controls were installed by previous versions of Microsoft Office and are installed by 32-bit Office 2010. An alternative must be found for existing Microsoft Office VBA solutions that utilize these controls when the code is migrated to 64-bit Office 2010. 64-bit Office 2010 does not provide 64-bit versions of the Common Controls.

Office 2010 32-bit and 64-bit in SxS mode

Office 2010 64-bit cannot be installed SxS with Office 2010 32-bit or previous versions of Office. Please use application virtualization if it is a possible path for you.