Global template loads twice


  • I have a global template in Word's startup folder. It acts as a code library for templates that are in the workgroup templates folder.

    All the templates in the workgroup templates folder have a reference in VBA to the global template so they can use the code that's in there.

    All of a sudden when a user creates a document based on a workgroup template, saves it, closes it and reopens it, I have a secondary reference to the global template.
    One is to the global template on a drive (the setting in Options - File Locations - Startup) and one is to the exact same file but then as listed with an UNC path.

    I can reproduce this behaviour on Windows 7 both for Office 2010 as for Office 2013.

    I don't understand why this is happening. I have made many templates before and never ran into this.

    The only way to resolve it, is to set the Startup location to the UNC path instead of the drive. Not all my clients will be able to do this. On many projects in the last years I never had a problem with this.

    What is changed, does anybody know?

    Sunday, June 23, 2013 1:47 PM

All replies

  • In the meantime I discovered that this behaviour only exists on Win 7 systems. Both 2010 and 2013 show the same behaviour.

    Most simple example to reproduce it:

    Create a dotm with only one procedure in a module:

    Sub TestStartup()
      MsgBox "Hi"
    End Sub

    Save this one as a global template in the startup folder.

    Create an additional .dotm in the workgrouptemplates folder with one module and one procedure:

    Sub AAA()
    End Sub

    Set a reference in the VBE to the startup template. Save this .dotm in the workgroup templates folder

    Restart Word and create a document based on the template in the workgroup templates folder. Check Developers - Document template and see that the global template is loaded.

    Run the macro AAA manually with Alt + F8.

    Check Developers, Document template. At my system, the global template is now loaded twice, one from the drive and one from the UNC.

    Of course both templates need to 'live' on a network or mapped drive in order to see the above result.

    Monday, June 24, 2013 9:40 AM
  • Hi,

    Sorry for my delayed reply.

    According to your description, this is not a development/programmatical issue. I think this would be a more appropriate forum for this issue:

    Word IT Pro Discussions:

    Or you can have a wider discussion in Microsoft Community:

    This thread will be moved to Off-topic. Thanks for your understanding.


    Damon Zheng
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Wednesday, June 26, 2013 10:39 AM