In VBA I am cycling through thousands of documents. The script stalls when it hits a document needomg repair. A dialog box opens entitled: "Show Repairs" with the message: "Errors were detected in thsi file, but Word was able to open the file by making the repairs listed below. Save the file to make the repairs permanent".
How do I override the dialog box? I am happy to skip the document altogether. Below is what I tried.
Application.DisplayAlerts = False
Set wrdDoc = wrdApp.Documents.Open(fileName:=strMyFile, PasswordDocument:="?#nonsense@$", ReadOnly:=True, OpenAndRepair:=False)
plication.DisplayAlerts = True