Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The only sure-fire way to determine whether <strong>Word</strong> will think that the file is corrupt is to get Word to open it :-). I don't think any 3rd-party application would be 100% reliable in this regard - after all, the document might in fact <em>not</em> be corrupt, but that doesn't help you if Word thinks that it <em>is</em>. However, clearly there are some situations you could detect, such as the file being zero-sized or suchlike.</p> <p>I don't come across many (any?) corrupt documents, so I do wonder if the corruption you're seeing might follow a pattern that you can detect? For example, are these documents downloaded from somewhere and usually missing the latter part of the file or something?</p> <p>In any case, a corrupt file is not the only reason that Word might pop up a dialog box. Other reasons include:</p> <ul> <li>the file is password-protected</li> <li>the file contains links to other files</li> <li>the file contains macros (which may themselves pop up dialog boxes, or which may cause the security warning dialog to appear)</li> <li>etc.</li> </ul> <p>You can circumvent some of these using Application.DisplayAlerts, etc. but not all (especially the security warning).</p> <p>I've had some success with using a 2nd thread that detects dialogs owned by Office and (for those that it recognizes) presses an appropriate button. It's hardly elegant, but it does work. And yes, my 2nd thread will also terminate the application if it takes too long to perform certain operations too.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload