I am missing something. If the object is to add a reference to a template, then save it, then as long as you have the needed reference (VBA Extensibility) to add a reference - then you can. A template is also a document. If I have a template, a .DOT file, which does NOT have a reference to, say, Microsoft Scripting Runtime
Sub AddReference ()
ActiveDocument.VBProject.References.AddFromFile _
FileName:="c:\winnt\system32\scrrun.dll"
ActiveDocument.Save
ActiveDocument.Close
End Sub
adds the reference and saves the file (still as a .DOT), then closes it.
If the file reopened (as a .DOT) the reference has been added.
If a document is created from the template it also has the reference.
What am I missing???? The fact that it is a .DOT, a template is not relevant. The Project references are objects of VBProjects are do not care if it is a .DOT, or a .DOC.
What am I missing???? It seems to not require anything other than AddFromFile.
Word 2002.