General discussion

Locked

How to deploy Word Macro/toolbar

By Arfo ·
I have an Word environment controlled by Group Policy where the User Templates paths are unique to each user (eg their Home drive), but the Startup and Workgroup Templates paths point to network shares that are common to groups of users depending on their department (eg Finance, Marketing etc).

My situation is that I have a new macro and associated toolbar button that I need to deploy to a subset of users from across different departments. Ideally I want to control it so that only members of a certain AD Group will get it. At this stage all I can think of is to copy the macro and toolbar manually into each users normal.dot. Anyone else out there have any other ideas?

This conversation is currently closed to new comments.

4 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

by BFilmFan In reply to How to deploy Word Macro/ ...

If you are installing the files via GPO and all the security groups are housed in a single OU; then,, you will need to filter the security groups which get the policy.

If the security groups are in different OU's then apply a different GPO to each OU.

Collapse -

by bschaettle In reply to How to deploy Word Macro/ ...

[1] Add code to your macro to check the current user. If they are not in the list of authorized users, then do not execute the macro. VBA code for retrieving a network Username follows.

Public Function GetNetworkUserName() As String
Dim sNetworkUsername As String
Dim wshNetwork As Object
On Error GoTo LeaveFunction
sNetworkUsername = "" ' default
Set wshNetwork = CreateObject("WScript.Network")
sNetworkUsername = wshNetwork.UserName
LeaveFunction:
Set wshNetwork = Nothing
GetNetworkUserName = sNetworkUsername
End Function ' GetNetworkUserName

[2] Save the macro and toolbar button into a Word template (*.dot)
[3] Copy the Word template into the Startup folder.

You could also add an AutoExec macro to the template that would check the current user, and set the visibility of the toolbar button to "False" if they're not an authorized user.

Collapse -

by Arfo In reply to

Poster rated this answer.

Collapse -

by Arfo In reply to How to deploy Word Macro/ ...

This question was closed by the author

Back to Software Forum
4 total posts (Page 1 of 1)  

Related Discussions

Related Forums