For those who are interested, here is a solution to avoid this problem
You just have to put at the beginning of the AutoClose() procedure (procedure without input argument) the following line of code:
ActiveDocument.Saved = True
From there, for word the document is saved. This "replaces" a bit a Cancel=True that we find for example in the procedure BeforeClose(...) of a class or other.
However, you must now manage the closing, saving... of the document yourself, otherwise word closes it without asking anything.
Well, it's not perfect yet, but it gives us something that may help a bit
|