This is the actual code that I am using, borrowed from Christos Samaras. Even though the author tries to account for potential problems, mine is a bit more specific that does not follow into any of these categories. In other words, I am able to start Acrobat, Acrobat tries to open the file, file is not a genuine PDF file. Then a message box appears from Acrobat itself, warning me that the file is not supportef format or corrupted etc. The issue is that I have to manually click on the OK button of this Acrobat message box so that the programme can be closed, error message "Could not open the PDF file" appears in my Excel document and the code resumes with the next iteration, which is not feasible for me. Ideal solution would be to find a way to close Acrobat automatically from VBA after this message box appears.
Bookmarks