Sunday, January 23, 2022

#1 2022-01-01 11:48:00 am

emendelson
Member
Registered: 2008-10-31
Posts: 397

Microsoft Word - trap "<file> uses a file type that is blocked" msg?

I am trying create an AppleScript that uses Word to convert DOC files to DOCX format. I have it working well, except when I try to open an old DOC file created by Word 2.0. Word displays a message that the file "uses a file type that is blocked from opening in this version."

Is there a way to trap this message and make my script display its own message and perform other actions? I tried putting the file open in a try block with "on error" but Word doesn't throw an error - it displays the message box that I'm trying to trap.

The file info for Word 2.0 files mistakenly describes them as Word 97 - 2004 documents, so I don't see any way to detect this format before opening the file in Word.

I'll be grateful for any help.

Last edited by emendelson (2022-01-01 11:53:05 am)

Offline

 

Board footer

Powered by FluxBB

RSS (new topics) RSS (active topics)