Results 1 to 3 of 3
  1. #1
    Star Lounger
    Join Date
    Jan 2003
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Distributing toolbars (WordXP)

    All our toolbars are in a global template. Whenever I change a toolbar or menu item and give this template to the users, it completely "reshuffles" all their toolbars. I don't want to lock the toolbars into any position, because everyone uses different toolbars.

    I have tried saving to the registry the coordinates of the toolbars as they close Word, and on opening Word, the autoexec macro sets up the toolbars. So that when I redistribute the toolbar template, it should remember their last setup. However, I am not having much luck with this. It always shuffles everything!

    Has anyone mastered distributing toolbars in Word? I would really appreciate some feedback on this.

    Thanks.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Distributing toolbars (WordXP)

    Word tries to "merge" the individual toolbars, but I've never noticed that it actually moves them to a different position... If you save the global template with nothing but Menu Bar visible, what happens when a user is updated? Maybe you can painstakingly add just the new/different controls to the relevant toolbars using VBA? (Sounds like a lot of work!)

    I think you might have to be just a little bit assertive about this because trying to adapt to an infinite variety of toolbar configurations really is not practical. Can't you say that there is a "standard" in the global template (e.g, Menu Bar, then Standard, then Formatting, all left justified, nothing else visible) and just warn people that whenever you update the template, if they like to position their bars differently, they may have to rearrange them again?

    BTW, I use Word 2000. XP probably behaves in ways unfamiliar to me. And maybe they aren't even logical. <img src=/S/laugh.gif border=0 alt=laugh width=15 height=15>

  3. #3
    Star Lounger
    Join Date
    Jan 2003
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    78
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Distributing toolbars (WordXP)

    Thanks Jscher2000.

    It has been a problem for us ever since Word97. When I distribute the toolbar template, the user's toolbars are always scattered around.

    I think I have solved this problem. I added some code to save and recall the coordinates of the toolbars from the registry. It works well because it remembers the individual's coordinates for the toolbars and whether they had them visible at all.

    Private Sub s_SaveToolbars()

    'Add this to the AUTOEXIT Routine - it saves the locations in the registry

    Dim oCommandBar As CommandBar

    For Each oCommandBar In Application.CommandBars
    With oCommandBar
    If .Type = msoBarTypeNormal Then
    SaveSetting cToolbars, .name, cVisible, .Visible
    SaveSetting cToolbars, .name, cLeft, .Left
    SaveSetting cToolbars, .name, cTop, .Top
    SaveSetting cToolbars, .name, cPosition, .Position
    End If
    End With
    Next

    End Sub


    Private Sub s_SetupToolbars()

    'Call this module form the AutoExec routine. It positions the toolbars.

    Dim oCommandBar As CommandBar

    For Each oCommandBar In Application.CommandBars
    With oCommandBar
    If .Type = msoBarTypeNormal Then
    .Visible = GetSetting(cToolbars, .name, cVisible, False)
    If .Visible Then
    .Top = GetSetting(cToolbars, .name, cTop, 0)
    .Left = GetSetting(cToolbars, .name, cLeft, 0)
    .Position = GetSetting(cToolbars, .name, cPosition, 1)
    End If
    End If
    End With
    Next

    End Sub

    Hope this will help someone else.

Posting Permissions

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