Many thanks Jim and Craige - I've now got a working solution that's an amalgam of both your recommendations. I had to use the "Batch Interactive" command because the JMP Alert wasn't being sent to the log, but I couldn't get the logcapture() command to work, whereas << get log() did what I needed.
I note that the log has to be cleared each time, or the same error message gets picked up on every subsequent run. Just for the record, I've included a stripped-down version of my final script below. (I'm guessing that the second "Batch Interactive(bi) term turns the interactive JMP Alert back on again - is that right?)"
OutputFileName = "$DESKTOP\My Slides.pptx";
if(not(file exists(OutputFileName)),
// No possible problem here;
Text Box("New File - First Page") << save presentation(OutputFileName);
caption("You've just started a new presentation - here it is..."); wait(2); caption(remove);
open(OutputFileName)
,
// The file exists but it might be open - so be wary;
bi = Batch Interactive( 1 );
// If I don't clear the log first, it will tell me there's an error even when there isn't;
clear log();
Text Box("Existing File - Next Page") << save presentation(OutputFileName, append);
Error_List = get log();
if(contains(concat items(Error_List), "Unable to overwrite"),
beep();
caption("You can't write to the file\!rbecause it's open right now.\!rPlease close it, then try again.");
wait(3);
caption(remove);
Batch Interactive(bi)
,
caption("Here's the updated presentation with your latest slide"); wait(2); caption(remove);
open(OutputFileName)
)
);