none
How to resolve items identified with Compatibility Inspector RRS feed

  • Question

  • In process of migrating from Word 2003 to Word 2010 which includes updating a template.
    Included is the summary and first 2 items in the report generated using the Compatability Inspector.

    1. The "URL" navigates to http://search.microsoft.com/?mkt=en-US
        That doesn't help me identify the issue.
    2. The following item is marked as DEPRECATION, what has been deprecated.
        If I re-enter this entry into the module I do not get any type of warning.
        What has been deprecated?
    ITEM:  [mso]AnswerWizardFiles.Count
    URL:  http://go.microsoft.com/?linkid=171733
    CODE:  If Selection.Previous(Unit:=wdWord, Count:=1).FormFields.Count > 0 Then Selection.Previous(Unit:=wdWord, Count:=1).FormFields(1).Range.Font.Name = "Courier New"
    3. The following item is marked as CHANGE. If I re-enter this entry into the module I
        do not get any type of warning.
        What has been changed?
    TYPE:  CHANGE
    ITEM:  [wrd]Application.PrintOut
    URL:  http://go.microsoft.com/?linkid=9718399
    CODE:  Application.PrintOut Range:=wdPrintRangeOfPages, Pages:="0", PrintToFile:=False      'Prints 0 pages to reset from PrintToFile

    Thanks in advance for your assistance.
    Tim

    SUMMARY:
    ========

    Document scanned:  N:\Template\Procedure.dot
    Date scanned:   Thursday, March 24, 2011
    Total lines scanned:  20564
    Total items found:    142
    Deprecated items:     95
    Changed items:         47
    Redesigned items:     0

    DETAILS:
    ========

    MODULE:  ExportForm
    FUNCTION: FormTextBox
    LINE:  7
    TYPE:  DEPRECATION
    ITEM:  [mso]AnswerWizardFiles.Count
    URL:  http://go.microsoft.com/?linkid=171733
    CODE:  If Selection.Previous(Unit:=wdWord, Count:=1).FormFields.Count > 0 Then Selection.Previous(Unit:=wdWord, Count:=1).FormFields(1).Range.Font.Name = "Courier New"

    MODULE:  ExportForm
    FUNCTION: ExportForms
    LINE:  80
    TYPE:  CHANGE
    ITEM:  [wrd]Application.PrintOut
    URL:  http://go.microsoft.com/?linkid=9718399
    CODE:  Application.PrintOut Range:=wdPrintRangeOfPages, Pages:="0", PrintToFile:=False      'Prints 0 pages to reset from PrintToFile


    Tim
    Thursday, March 24, 2011 5:37 PM

Answers

  • Hi Tim,

      

    The proper usage scenario is to not really review every single item and then fix it, but rather to debug the code and if an error occurs or a compile error occurs then look to see if there is an OCCI comment nearby. Otherwise, there is not a lot you can do. In these examples, it is simply a false positive in that some part of the line of code matched close enough to an item that was flagged as changed or removed.

     

    The URL’s are pointing at nothing for now and in future it may be linked to relevant guidance articles. For now, you can ignore these URL's.

     

    Hopefully this helps.

     

    Thanks,

    Sekar

    • Marked as answer by Tim_Shaf Thursday, March 31, 2011 9:35 PM
    Thursday, March 31, 2011 9:12 PM

All replies

  • Hello Tim, 

    Thank you for your question. I am trying to involve someone familiar with this topic to further look at this issue. There might be some time delay. Appreciate your patience.  Thank you for your understanding and support.

    Have a nice weekend.


    Bessie Zhao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, March 25, 2011 10:20 AM
  • Hello Tim, 

    The Deprecated items are 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 your code. The Changed items are items in the code that use a command whose syntax has changed. If your code uses outdated syntax, you must update the code. To learn more about Compatibility Inspector please refer to following article:

     

    Microsoft Office Code Compatibility Inspector user's guide

    http://technet.microsoft.com/en-us/library/ee833946.aspx

     

    For Example, the AnswerWizard object has been deprecated in the 2007 release of the Microsoft Office system and alternative methods are documented in following article here. Please refer to following article to learn more about all changes that were made in Office 2010 object model (it also includes previous and new syntax of changed items including PrintOut).

     

    Word 2010 Object Model Changes Since Earlier Versions

    http://msdn.microsoft.com/en-us/library/ee836186(office.14).aspx

     

    The deprecated/changed items in the code may still run fine but it may cause issues at some point depending on the use and applications. The primary function of Compatibility Inspector is to give some kind of guidance in the event that you do actually get an error on a specific line of code.  In that case you can check the changes made to the object model and see if you are using something that has been removed or changed, and modify the code using recommended methods, as needed.

     

    Hopefully this helps.

     

    Thanks,

    Sekar

    Wednesday, March 30, 2011 3:06 AM
  • Hi Sekar,

    I think I am understanding you, but....

    1. What does the following CODE have to do with [mso]AnswerWizardFiles.Count?

    TYPE:  DEPRECATION
    ITEM:  [mso]AnswerWizardFiles.Count
    URL:  http://go.microsoft.com/?linkid=171733
    CODE:  If Selection.Previous(Unit:=wdWord, Count:=1).FormFields.Count > 0 Then Selection.Previous(Unit:=wdWord, Count:=1).FormFields(1).Range.Font.Name = "Courier New"

    2. I have looked at http://msdn.microsoft.com/en-us/library/ff840681.aspx
        {Application.PrintOut Method (Word) Office 2010}
        The Range, Enum wdPrintRangeOfPages, Pages, and PrintToFile are all supported.
        What am I over-looking?

    TYPE:  CHANGE
    ITEM:  [wrd]Application.PrintOut
    URL:  http://go.microsoft.com/?linkid=9718399
    CODE:  Application.PrintOut Range:=wdPrintRangeOfPages, Pages:="0", PrintToFile:=False      'Prints 0 pages to reset from PrintToFile

    3. Regarding the the URL that the Compatibility Inspector provides.
        What is it's purpose?

    Appreciate your help.


    Tim
    Wednesday, March 30, 2011 12:29 PM
  • Hi Tim,

      

    The proper usage scenario is to not really review every single item and then fix it, but rather to debug the code and if an error occurs or a compile error occurs then look to see if there is an OCCI comment nearby. Otherwise, there is not a lot you can do. In these examples, it is simply a false positive in that some part of the line of code matched close enough to an item that was flagged as changed or removed.

     

    The URL’s are pointing at nothing for now and in future it may be linked to relevant guidance articles. For now, you can ignore these URL's.

     

    Hopefully this helps.

     

    Thanks,

    Sekar

    • Marked as answer by Tim_Shaf Thursday, March 31, 2011 9:35 PM
    Thursday, March 31, 2011 9:12 PM
  • Thanks Sekar,

    Have a Good Weekend


    Tim
    Thursday, March 31, 2011 9:36 PM