That is kind of dependent on parameters outside of filemaker's control, so there's no way to really suppress the dialog. Also that error can also be triggered for other reasons (for instance, lack of permissions to write to a directory).
What you could potentially do is run a system script to check for the file's open status prior to your export step, and generate your own dialog as well as pause the script to allow for the user to close the file.
I have a couple plugins, but I haven't found checking if the file is open as an option on them (MonkeyBread, Scriptmaster)
Filemaker should allow this to be defined by the user
I am on Windows, but the idea of closing the file would be good to, I just checked my 2 plugins and don't see that as an option
I usually use scriptmaster (free) plugin to execute command line functions written in Java.
You could use taskkill via command line, but most windows commands are geared towards closing processes, not individual files. EG you would force close excel, but not theFile.xlsx.
Something like this:
Most of the time this is disruptive to user’s workday if they are constantly using excel for things, but if it’s the type of thing where you’re running a daily report and your results are the only reason they have excel open, then the force quit might be a good option for you.
though now we're looking for somebody familiar with Visual Basic
(It's not me)
There are script steps like send DDE execute OR send Event(?!).
This function work native tools without PlugIns.
Good out of the box thinking.
I agree it is overkill, I don’t think customers wouldn't like to have their application closed.