I am writing a little simple code to open a Word document, save it in a new format and close the document. However, I ran into problems if the document was left in a locked state and the File In Use dialog box opens.

Now I would be happy to choose option 1 or 3 automatically, but I can not find a way. Ideally, I would have prevented him from showing at all with the parameter of the open method. I use Delphi, but this is not relevant.
Wordapp.documents.Open(InputFile);
source
share