|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
multiple templates referencing common reference, in a network environment
Hi,
I have a number of forms (macro-enabled Word-templates) that share a lot of code. In order to make maintaining the code easier, I have put the shared code into a .docm file, put that in a network folder. I add a reference to the .docm in the network location to each Word-template. I encounter two problems with this setup: - When I create a new instance of a document based on the template, the .docm file is loaded into a separate window. That's distracting. - When multiple users have documents open that contain the shared reference, they get messages "xxx.docm is locked for editing by [user]". That's distracting. I would like to share the code, but avoid the problems above. If the forms were in Excel, I'd put the shared code in an add-in (XLAM), which doesn't show as a window, and quietly accepts that it's opening read-only. I haven't found the Word-equivalent of XLAMs. How would you share code in this situation? How would you prevent the above problems? |
#2
|
|||
|
|||
Hm... Maybe I was a little too quick to write my own question... Reading a little more in this forum, I was inspired to try something.
For others encountering this problem: Save the shared code in a .dotm file, not a .docm file Advantages: The problems above disappear Disadvantage: Development becomes a pain in the ... arm, as you can't see the code in the reference when testing a form instance. My workaround will be to use .docm during development, then change to .dotm when rolling out to users. |
#3
|
||||
|
||||
With a dotm loaded as an addin you can run the code but if you want to do development on the same file you need to OPEN it directly (as well). That way you can edit the code and save the template as required.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
Tags |
microsoft word, reference, vba |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Multiple templates with common styles | mikejvir | Word | 2 | 12-16-2019 09:44 PM |
Excel Structured Referencing: non-English reference? | tinfanide | Excel | 0 | 09-05-2015 04:41 AM |
Share Excel Add-In In A Network Environment? | ibrahimaa | Excel | 5 | 04-30-2012 05:30 AM |
Need help with sorting a column by most common to least common | mikenmike0001 | Excel | 5 | 12-06-2011 05:17 PM |
link common slides in multiple presentations | robtho | PowerPoint | 1 | 06-24-2011 12:55 AM |