L
Luca.albanesi
Hi,
I've got this unusual problem to solve.
I have a Word Document Template (.dot) that is used by my co-workers
to prepare offers for customers. This adds on top and bottom of the
document our company logo and a few contact infos.
My co-workers asked me if I can show an alert when they close the
document, asking "Do you want to save this document in the 'offers'
directory? (Y/N)" and I made this through a macro, using the "close"
event of the document. There are a few problems, though:
- This prompt happens everytime the user closes the file
- This must not be displayed if the customer opens and closes it
My idea was to make it execute only once, so that the second time it
won't be displayed... but how do I do it? How can I set a flag or
something so that a macro is executed only once, or how can I delete a
macro from scripts in VBA?
Thanks in advance!
I've got this unusual problem to solve.
I have a Word Document Template (.dot) that is used by my co-workers
to prepare offers for customers. This adds on top and bottom of the
document our company logo and a few contact infos.
My co-workers asked me if I can show an alert when they close the
document, asking "Do you want to save this document in the 'offers'
directory? (Y/N)" and I made this through a macro, using the "close"
event of the document. There are a few problems, though:
- This prompt happens everytime the user closes the file
- This must not be displayed if the customer opens and closes it
My idea was to make it execute only once, so that the second time it
won't be displayed... but how do I do it? How can I set a flag or
something so that a macro is executed only once, or how can I delete a
macro from scripts in VBA?
Thanks in advance!