Continuing with the deep dive into new tools in Office 2010 Application Compatibility, we would like to explore and illustrate in detail how Code Compatibility Inspector (CI) functions.
Visit the prior post on App compat. Visit the drill down on the environment assessment tool.
The Microsoft Office 2010 Code Compatibility Inspector is designed to assist an enterprise or small business with updating VBA and VSTO code so that it becomes compatible with Office 2010. While the tool does not directly make code corrections (other than correcting Declare Statements for 64bit compatibility in VBA), it does comment code in locations where potential Object Model changes have been identified. Users or developers debugging their code can get assistance from the comments and links to topics on MSDN that detail the changes that may be affecting a specific line of code. Here is what CI actually do:
CI can be run by an individual developer or macro user, when they have access to the code. Here is what you can expect to see when you download and run the installation package:
You have choice of the installation either in the Office VBA environment or in the Visual Studio environment or both if you prefer.
To inspect a code in a document for compatibility, you would follow these steps:
The <URL></URL> tag will contain a URL to the relevant site on MSDN describing the suspect OM change found (it is not in this picture because.
SUMMARY:
========
Document scanned: c:\Test.ppt Date scanned: Tuesday, October 20, 2009 Total lines scanned: 319 Total items found: 35 Deprecated items: 0 Changed items: 2 Redesigned items: 0 Declare statements: 32
DETAILS: ======== MODULE: clsPPTEvents FUNCTION: PowerPointApp_WindowSelectionChange LINE: 20 TYPE: CHANGE ITEM: Presentation.SlideMaster URL: CODE: Set objMaster = ActivePresentation.SlideMaster MODULE: clsPPTEvents FUNCTION: PowerPointApp_WindowSelectionChange LINE: 37 TYPE: CHANGE ITEM: Presentation.TitleMaster URL: CODE: Set objMaster = ActivePresentation.TitleMaster
Once you have successfully inspected your code if CHANGED, DEPRECATED or REDESIGNED items were found will be to start debugging your code. We suggest you perform a full test pass on your code, inspecting each function. If problem are found and you break into the debug of your code, check to see if there is a VSTO Code Compatibility Inspector comment above that line. If there is, it should give you direction on the type of problem occurring in that line of code and will contain a URL that you can copy and paste into your browser to get more information. Once you have completed verifying your code for Office 2010 compatibility, you can remove the comments from the code by clicking the Remove VSTO Inspector Comments on the Tools menu:
As we mentioned in our previous post on OEAT - we will be offering a preview of the tools for Office 2010 application compatibility in early December. We also recommend you stay tuned to the Office 2010 public beta to be delivered in November as well, so that you can experiment with getting your 2003 and 2007 solutions to work with Office 2010.
If you would like to sign up for the beta of OEAT and CI, please send an email to this address: mailto:OFAPPCPT@Microsoft.com.
Thank you for the information. I have same experience with the OMPM and have two questions regarding the CCI.
1. Will I be able to use the CCI with Office 2007? I am aware that some results will not be accurate. But I have a lot of customers with reeeaally old documents, that tool can help them to separate "good" and "bad" documents.
2. Will the CCI be client-user only? Or will there also be a version which I can fire up and say "go, crawl thru this fileserver and mark all vba-code you can open. And give me a report afterwards"?
Thank you
@Martin Nothnagel
Martin,
On 1 - CCI will only install into Office 2010. Office 2010 compatibility is our scope and when we point out the OM changes that impact the code running in Office 2010 and as developer remediate the found changes, they would need to be tested in Office 2010.
On 2. - let me just say that you will be able to bulk assess macros. Please watch this blog for more details :)