Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

Populate Word template location by AD Group

Posted on 2009-05-14
Last Modified: 2012-05-07
Currently we have a number of small sites who have their own local servers. Each server has the site's word templates for that specific location (T:\Templates)

We are going to be centralising these files and amalgamating them on one server. As there are so many templates, we don't want to place them all in the same folder and want to only present the same templates to the same users as before. Each user will now get access to the same T drive location.

I think the best way to sort this out would be to place the templates within sub folders and redirect the clients to the relevant subfolder depending on an AD group. So;

Templates would be located at
T:\Templates\Main Street
T:\Templates\High Street
T:\Templates\John Street

and there would be an AD group for each (e.g. MainStreetUsers-GRP, etc)

I have previously seen somewhere where the decription field of a group was used to populate a location for drive mappings and guess the same principle could be used here?

This would then have to be inserted into the registry or interpreted by a Group Policy?

Is there an easier way to do this? Any pointers? code?

Many thanks

Question by:aideb
  • 2
  • 2
  • 2
  • +1

Assisted Solution

alayanna earned 225 total points
ID: 24383389
Create a kix script and run it as a logon script:
IF INGROUP ("MainStreetUsers-GRP")
      SHELL WriteValue('HKCU\Software\Microsoft\Office\11.0\Common\General','SharedTemplates','T:\Templates\Main Street','REG_SZ')
IF INGROUP ("HighStreetUsers-GRP")
      SHELL WriteValue('HKCU\Software\Microsoft\Office\11.0\Common\General','SharedTemplates','T:\Templates\High Street','REG_SZ')
IF INGROUP ("JohnStreetUsers-GRP")
      SHELL WriteValue('HKCU\Software\Microsoft\Office\11.0\Common\General','SharedTemplates','T:\Templates\John Street','REG_SZ')
LVL 19

Assisted Solution

PeteJThomas earned 175 total points
ID: 24383729
Something just worth considering too - Using drive mappings for things like this MAY become problematic. If the mapping on the client fails, or if the script runs before the mapping has been made, then T: doesn't exist...

So it MAY be worth using the full UNC path to the server instead of including the mapping for this script.

Just a thought... :)


Author Comment

ID: 24385230
I would prefer if possible to do this via vbscript or using a GPO if this is possible?
The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

LVL 19

Accepted Solution

PeteJThomas earned 175 total points
ID: 24385455
To do it via a GPO, you would need to have separate GPOs for each group of people or site or however you separate them.

From there, there are different ways of applying the GPOs to the users - You could either apply all GPOs to some sort of root OU or at the domain level, then using the security filtering options of the GPO, only allow the relevant users the permissions to apply each policy.

However my preferred method, would be to if you alreayd have the users separated into different OUs (site OUs or whatever) and simply linked each policy to it's corresponding OU.

So, as for the policies themselves, you need to install some new admin templates I believe. See this on how to do so - http://www.windowsnetworking.com/kbase/WindowsTips/Windows2003/AdminTips/Network/ManagingMicrosoftOfficeApplicationswithGroupPolicy.html

However I can find no reference to the specific settings available in these templates, so I can provide no guarantee that there is a setting to define where the template is stored for the objects that policy is linked to. There is some info about the settings available here - http://office.microsoft.com/en-gb/help/HA011402401033.aspx

Now, there is an alternative if the necessary settings are not available. There is a freeware tool available called 'RegToAdm' - All this tool does, is to create a custom admin template from an exported .reg file. So you'd simply need to edit the registry on a PC to reflect the first location for the template. Export that key to a .reg file, then use the tool to create an .adm file that can then be enforced through a GPO.

You can find the tool here - http://3d2f.com/tags/regtoadm/download/  The tool itself is a part of a larger toolset called NUTs. It definitely works in most cases, however this should be thoroughly tested in a test environment before deploying any custom templates into a production environment.

Let me know if you have any further questions... :)



Assisted Solution

alayanna earned 225 total points
ID: 24385952

Set objSysInfo = CreateObject("ADSystemInfo")
strUserInfo = "LDAP://" & objSysInfo.UserName
Set objUser = GetObject(strUserInfo)
Set objGroup = GetObject("LDAP://cn=Group,cn=Users,dc=Domain,dc=com")
If (objgroup.IsMember(objUser.AdsPath) = True) Then
      WS.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Common\General","'T:\Templates\Main Street'"
end if

Assisted Solution

DK_User earned 100 total points
ID: 24386210
Word has a standard filepath for WorkGroup Templates, which you can set through GPO.

You will have to load the Office 2007 Administrative Template (ADM) from this link into the appropriate GPO.
After you have applied the ADM file, you simply set the Workgroup templates path to the appropriate serverpath under:
User Configuration - Administrative Templates - Microsoft Office 2007 System - Shared Path
It could look like this> \\server\templates\mainstreet
Place the shared templates in the folder and be sure to give usergroups the appropriate Share Rights(Full), and NTFS( Read)

Users can now use the shared templates directly from within Word when making a new documents.
"File" - New - Installed Templates
When users have used the Template for the first time, it appears also unde My Templates
Hope it helped


Author Closing Comment

ID: 31581372
Decided to go with individual GPO's at each site. Thanks for all the suggestions and help



Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A few years ago I was very much a beginner at VBA, and that very much remains the case today.  I'll do my best to explain things as I go in the hope that other beginners can follow.  If you just want to check out a tool that creates a Select Case fu…
This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
The viewer will learn how to make their project stand out over others by learning how to change colors and shapes, add spaces, change directions, and add bullets to their charts.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question