Specifically here is what I need:
I am giving a template to users which includes several VBA forms and
allows them to make a series of selections and bring in data from
multiple sources and then launch one of several letter templates using
the gathered data. The user will launch the template merely through a
shortcut or double-clicking the template file itself.
However, if the template is already open, I do not want them to be able
to double-click it again and open a 2nd copy. I assumed I could
prevent this by checking the documents collection to see if any open
document had this template as the attached template, but when I
double-click the template it opens a NEW instance of Word and then it
is only aware of documents opened in its own instance and ignores the
fact that the template is opened in another instance.
So, I need to be able to either check ALL instances of Word to see if
this template is in use and then prevent it opening again, OR apply
some property or code that restricts the template to only being opened
once.
I'm very new to VBA and anything other than general use of Word so I
have no idea what options are at my disposal.
Thanks for any help you can provide.