Bonjour,
Dans son message, < Lee > écrivait :
In this message, < Lee > wrote:
|| Our Document Management system (DMS) doesn't quite work
|| that way. It's not so straight forward as that. When the
|| DMS creates a new document based on a template, it creates
|| a version then edits the document so we have to have a
|| special command line in the Edit command of the DMS to run
|| the coding. If you need to edit the document again, it
|| runs the coding but I only want the coding to run when a
|| new document is generated based on the template. It's
|| very confusing.
||
|| The only way around the coding not running again when
|| someone wants to edit the document again is to have
|| something in the template that is deleted once the user
|| fills in the userform (the first time).
Use a custom Boolean property. Set its value to False and change it to true
once the userform runs. Then, in your code, always check for the value of
the said property. If it is true, do not run the code.
--
Salut!
_______________________________________
Jean-Guy Marcil - Word MVP
(e-mail address removed)
Word MVP site:
http://www.word.mvps.org