Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Jun 2005
    Thanked 0 Times in 0 Posts

    Toolbars for specific teams (WordXP)

    There are currently a set of 5 templates shared by all 3 teams. The macros, autotext and toolbars for everyone are saved in the startup folder.
    Some of the teams require additional toolbars for their work. What is the best way to give them their individual toolbars & code (so that the other staff members don't get these)?

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Silicon Valley, USA
    Thanked 94 Times in 90 Posts

    Re: Toolbars for specific teams (WordXP)

    Does "the" startup folder indicate that you have a single startup folder shared by everyone in your organization, or that you copy various global templates into everyone's individual folder. If it's the latter it is easy to give another global template just to those who should have it. You also could use different Workgroup templates folders, if the tools are oriented more toward individual documents, rather than global utilities.

  3. #3
    4 Star Lounger
    Join Date
    Dec 2003
    Zoetermeer, Zuid-Holland, Netherlands
    Thanked 0 Times in 0 Posts

    Re: Toolbars for specific teams (WordXP)

    If there's a way to identify through code to which team the user belongs, you could use a macro to toggle the visibility of the commandbar. One way to achieve this is to place an INI file in the MyDocuments folder which lists the users log-in name and team they belong to. Example: MyDocumentsTeam.ini, which contains the following lines;
    username=<log-in name>
    teamname=<team name>

    If there are people who work for more then one team, you could specify that by: =<team name>;<team name>.
    (The key "username" is not required for this solution, but maybe it's suited for other purposes.)

    Make sure that all team-commandbars visiblity is set to False in the template.
    Then, create or use an existing AutoOpen macro in the template that fires each time a document based on the template is opened, to call ToggleCommandbars from:

    <font face="Georgia"> Sub ToggleCommandbars()
    Dim strPath As String
    Dim varTeam As Variant
    Dim intCounter As Integer

    strPath = GetSpecialFolder("Personal") 'Path to MyDocuments folder
    varTeam = Split(System.PrivateProfileString(strPath & "Team.ini", "Team", "teamname"), ";")
    For intCounter = 0 To UBound(varTeam)
    Commandbars(varTeam(intCounter)).Visible = True
    Next intCounter
    End Sub

    Function GetSpecialFolder(strFolder As String) As String
    Dim strKey As String
    strKey = "HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentv ersionExplorerShell Folders"
    GetSpecialFolder = System.PrivateProfileString("", strKey, strFolder)
    End Function </font face=georgia>

    I typed this of the top of my head and don't have time to test it myself right now. But it gives you an idea how to do it.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts