none
How to check a document for repair-errors in advance

    Frage

  • Hi

    In one och my Add-Ins we have a converting-function, which converts from .DOC-format to .DOCX-format aswell as editing headers/footers and adding some custom properties.

    I have a problem with some older documents which seems to hold defect or damaged frames, images and OLE-objects.
    These object is identified when the document is opened with OpenAndRepair, not otherwise.

    Is there a way to identify these objects through code without closing and reopen the document with OpenAndRepair flag?

    Thanks in advance


    Best Regards Peter Karlström Midrange AB, Sweden

    Montag, 27. Februar 2012 10:22

Alle Antworten

  • Hi Peter,

    Thank you for posting.

    I did some research about your problem but didn't find other ways to identify the objects through code except for using the OpenAndRepair flag.

    I will also help you involve others to help you. There might be some delay about the response. Appreciate your patience. 

    Best Regards,


    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us

    Mittwoch, 29. Februar 2012 02:25
  • Hi Peter,

    My name is Ross and I am a Support Engineer for Microsoft Word. This KB article (http://support.microsoft.com/kb/893672) contains information for creating a macro to open all documents with Open and Repair. Please read through it and let me know if the information is helpful.

    Thanks,

    Ross


    Ross - Sr. Support Engineer Microsoft Office

    Mittwoch, 29. Februar 2012 16:59
  • Hi Ross

    Thanks for your response.

    My customers documents is opened thru automation from a web-based application.
    I can not force all their documents to open with OpenAndRepair, since I'm sure their users will not approve of this.

    My question is if there is a way off scanning through the document for errors after it is opened.
    Then, if I find any errors, I can present the user with a suggestion to close and reopen the document with OpenAndRepair.

    Thanks in advance


    Best Regards Peter Karlström Midrange AB, Sweden

    Mittwoch, 29. Februar 2012 20:31
  • Hi Peter,

    Unfortunately, there isn't a way to check for corruption, or perform the Open and Repair functionality outside of Word. Also, I could not determine a way to scan the files for corruption while they are open. If there is corruption, an Open and Repair is your best chance to fix it and your best way to be notified.

    Thanks,

    Ross


    Ross - Sr. Support Engineer Microsoft Office

    Donnerstag, 1. März 2012 22:01
  • Hi Ross

    OK. I almost suspected this, but I had to give it a shot. My customer would have loved this function in my solution.

    Thanks anyway


    Best Regards Peter Karlström Midrange AB, Sweden

    Freitag, 2. März 2012 07:17