A
Alder
Hi all,
There's something very peculiar going on with the system of shared Word
templates I'm developing.
The "system":
INITWORKGROUP.DOT
Loaded by each user at Startup from a shared network folder, this template
runs an AutoExec macro to declare some global variables and define some
constants. It also contains two CommandBars: "SharedBar" and
"LetterOptions". The "SharedBar" is displayed at Word startup and contains
buttons to run short macros (stored in a standard module of this template)
to open new documents based on document templates. This CommandBar also has
buttons that run macros contained in a standard module of the template
described next. There are no References defined in this template's project.
SHAREDLIBRARY.DOT
Contains global variables and several VBA subs and functions used by the
document templates. A Reference to INITWORKGROUP.DOT is defined in this
template's project to make the variables defined by the previous template
available to modules in this project. The SHAREDLIBRARY.DOT file is not in
the Startup folder.
Document templates
Each contains a Reference to both INITWORKGROUP.DOT (for accessing its
variables) and SHAREDLIBRARY.DOT (for accessing its modules).
The "problem":
The system works when one user in the workgroup opens Word. When a second
user opens Word the "SharedBar" displays, but when one of its buttons is
clicked, the INITWORKGROUP.DOT template is loaded a second time. Each
subsequent button click loads a copy of INITWORKGROUP.DOT.
My design has a big mistake in it, but I don't see where it is. If anyone
has suggestions on how to properly design this system, I'd appreciate it.
Thanks,
Alder
There's something very peculiar going on with the system of shared Word
templates I'm developing.
The "system":
INITWORKGROUP.DOT
Loaded by each user at Startup from a shared network folder, this template
runs an AutoExec macro to declare some global variables and define some
constants. It also contains two CommandBars: "SharedBar" and
"LetterOptions". The "SharedBar" is displayed at Word startup and contains
buttons to run short macros (stored in a standard module of this template)
to open new documents based on document templates. This CommandBar also has
buttons that run macros contained in a standard module of the template
described next. There are no References defined in this template's project.
SHAREDLIBRARY.DOT
Contains global variables and several VBA subs and functions used by the
document templates. A Reference to INITWORKGROUP.DOT is defined in this
template's project to make the variables defined by the previous template
available to modules in this project. The SHAREDLIBRARY.DOT file is not in
the Startup folder.
Document templates
Each contains a Reference to both INITWORKGROUP.DOT (for accessing its
variables) and SHAREDLIBRARY.DOT (for accessing its modules).
The "problem":
The system works when one user in the workgroup opens Word. When a second
user opens Word the "SharedBar" displays, but when one of its buttons is
clicked, the INITWORKGROUP.DOT template is loaded a second time. Each
subsequent button click loads a copy of INITWORKGROUP.DOT.
My design has a big mistake in it, but I don't see where it is. If anyone
has suggestions on how to properly design this system, I'd appreciate it.
Thanks,
Alder