We help IT Professionals succeed at work.

Office 2010/2007 template deploy script available?

lukeglazebrook
lukeglazebrook asked
on
Hello hope someone can help we currently deploy our Office templates using the following sub-script below...

"Const wdStartupTemplatesPath = 7
Const wdWorkgroupTemplatesPath = 3

Set objWord = CreateObject("Word.Application")
Set objOptions = objWord.Options

objOptions.DefaultFilePath(wdStartupTemplatesPath) = "C:\Brand Templates\startup"
objOptions.DefaultFilePath(wdWorkgroupTemplatesPath) = "C:\Brand Templates\startup"

objWord.Quit"

Unfortunately however this script does not seem to provide using with the add-ons tab within Office 2010/2007.  It works fine for 2003 users so presumably its simply not compatible?  Does anyone know of a 2007 or 2010 compatible version of the above script?
Comment
Watch Question

Most Valuable Expert 2012
Top Expert 2014
Commented:
Hi, according to this wdDefaultFilePath enum for Word 2007:
http://msdn.microsoft.com/en-us/library/bb237620(v=office.12).aspx

the constants should be:
Const wdStartupPath = 8
Const wdWorkgroupTemplatesPath = 3

so you can try that.  Otherwise, the easiest way to set them is by Group Policy, after importing the admx files into your Group Policy.

Regards,

Rob.
Most Valuable Expert 2012
Top Expert 2014

Commented:
You might also like to try setting
Const wdUserTemplatesPath = 2

and using that as well.

Rob.

Author

Commented:
Group policy was the most simple solution