Add Shared Templates to Word 2003

By | October 4, 2007

Having templates in MS Word is a useful thing when you have company letterhead or other forms.
Here is an easy way to access templates on a central repository.

First, create a folder for your templates (.dot) file on a network drive (e.g., S:\Shared Templates). Next, add your path to the script below. Lastly, run this script via Group policy startup script.

To access the new templates in word go to:
1.  File>New
2.  Click on "On my computer…" link under the Templates heading.
3.  You will find your new templates on the general tab.

———-COPY EVERYTHING BELOW THIS LINE for the Script———-
Const HKCU = &H80000001

'On Error Resume Next

strComputer = "."
 
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
    strComputer & "\root\default:StdRegProv")
 
strKeyPath = "Software\Microsoft\Office\11.0\Common\General"
strValueName = "SharedTemplates"

oReg.GetExpandedStringValue HKCU,strKeyPath, _
    strValueName,strValue

If  strValue = "W:\Shared Templates" Then
 'WScript.Echo "Key Exists"
 Set oReg =Nothing
 Wscript.Quit
 
Else 

 strValue = "W:\Shared Templates" 'Put The Mapped Drive Path Here.
 oReg.SetExpandedStringValue HKCU,strKeyPath,strValueName,strValue
 'WScript.Echo "Key Written"
End If

Set oReg =Nothing
WScript.Quit

 

———-COPY EVERYTHING ABOVE THIS LINE for the Script———-

 

 

PLEASE MAKE SURE NO WORD WRAPPING IS HAPPENING IN YOUR SCRIPT!!!

1. You need to be an Admin for this to work.
2. Put The Mapped Drive Path Here In The Script   strValue = "W:\Shared Templates"

This information is provided "AS IS" with no warranties expressed or implied.

Leave a Reply

Your email address will not be published. Required fields are marked *