I've been developing a program that fires up Word, and does a few clever things like a wordcount to keep a record of progress. It uses this:-
WordApp:=CreateOleObject('Word.Application');
It's been working fine for, I don't know, a year or two, but now it won't close the document (and therefore won't quit).
labelinfo.caption:='Saving...'; sourcedoc.save;
labelinfo.caption:='Closing...'; sourcedoc.close;
labelinfo.caption:='Quitting...'; wordapp.quit;
labelinfo.caption:='Done. ';
Instead, Word flashes and requires it to be quit manually
without save/don't save/cancel! (Luckily, the line before this is the sourcedoc.save, which does still work.) I've tried putting the sourcedoc.close in a try...except, but it still locks up waiting for Word.
I suspect a Word issue, but I can't find out what it could be. Anyone got any ideas, please.