Solved

Populate Word template location by AD Group

Posted on 2009-05-14
7
1,184 Views
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

Aidan
0
Comment
Question by:aideb
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 1

Assisted Solution

by:alayanna
alayanna earned 225 total points
Comment Utility
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')
ENDIF
IF INGROUP ("HighStreetUsers-GRP")
      SHELL WriteValue('HKCU\Software\Microsoft\Office\11.0\Common\General','SharedTemplates','T:\Templates\High Street','REG_SZ')
ENDIF
IF INGROUP ("JohnStreetUsers-GRP")
      SHELL WriteValue('HKCU\Software\Microsoft\Office\11.0\Common\General','SharedTemplates','T:\Templates\John Street','REG_SZ')
ENDIF
QUIT
0
 
LVL 19

Assisted Solution

by:PeteJThomas
PeteJThomas earned 175 total points
Comment Utility
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... :)

Pete
0
 
LVL 2

Author Comment

by:aideb
Comment Utility
I would prefer if possible to do this via vbscript or using a GPO if this is possible?
0
Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

 
LVL 19

Accepted Solution

by:
PeteJThomas earned 175 total points
Comment Utility
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... :)

Pete

0
 
LVL 1

Assisted Solution

by:alayanna
alayanna earned 225 total points
Comment Utility
Try:

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
0
 
LVL 3

Assisted Solution

by:DK_User
DK_User earned 100 total points
Comment Utility
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.
http://www.microsoft.com/downloads/details.aspx?FamilyID=92d8519a-e143-4aee-8f7a-e4bbaeba13e7&displaylang=en
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
http://support.microsoft.com/kb/924460
Hope it helped





 
0
 
LVL 2

Author Closing Comment

by:aideb
Comment Utility
Decided to go with individual GPO's at each site. Thanks for all the suggestions and help

Cheers

Aidan
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Introduction This tutorial provides instructions on how to properly format your Word document using the inbuilt tools provided. The benefits of using these tools means your documents are more accessible and easily portable to other applications an…
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 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…
Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…

763 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now