Results 1 to 8 of 8
  1. #1
    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: Word 2000 (SR-1) - Toolbar placement

    Interesting! I tried docking the clipboard toolbar in different places, ran this macro, and got the following results in the Immediate window (Ctrl+G):

    Sub cBarLoc()
    Dim cbar As CommandBar
    For Each cbar In CommandBars
    If cbar.Visible Then
    Debug.Print cbar.Name, cbar.Position, cbar.Left, cbar.RowIndex
    End If
    Next
    End Sub

    Clipboard toolbar at end of first (standard) toolbar:

    <pre>Standard 1 0 2
    Formatting 1 0 4
    Menu Bar 1 0 1
    Clipboard 1 700 2 </pre>

    Clipboard toolbar at end of second (formatting) toolbar:

    <pre>Standard 1 0 2
    Formatting 1 0 4
    Menu Bar 1 0 1
    Clipboard 1 731 4 </pre>

    Clipboard toolbar by itself on the third row under the Menu bar:

    <pre>Standard 1 0 2
    Formatting 1 0 4
    Menu Bar 1 0 1
    Clipboard 1 0 5 </pre>

    (Which begs the question - where is .RowIndex = 3 ?)

    So it appears you will need to experiment with values for the .Left property that put the bar in the correct location, or, better yet, run the above macro to snag the value of wherever you put it, and then code it like this:

    With myBar
    .RowIndex = msoBarRowFirst
    .Left = 700
    End With

    (While you're at it, you could expand the macro to explore other properties of the CommandBar object. Who knows? Perhaps there a gem there somewhere.)

  2. #2
    sidalp
    Guest

    Re: Word 2000 (SR-1) - Toolbar placement

    <img src=/S/grin.gif border=0 alt=grin width=15 height=15>jscher2000: Thanks for your suggestions. I think we are on the right track, but not quite there yet. Please bear with me as I do not know VBS. I reproduced the macro you had in your reply and ran it after positioning the clipboard tool bar where I wanted it and got the following result: Standard 1 0 6; Formating 1 0 8; Menu Bar 1 0 2; Clipboard 1 711 8. Next I modified the MS provided macro as follows: .Position = msoBarTop
    .RowIndex = msoBarRowFirst .Left = 711. The clipboard tool bar unfortunatel ended up on the top of the Word window just below the title bar. It looks like it is correctly placed horizontally, however. Any idea how to get the macro to getit down to the second (lowest) tool bar? It looks like the only options for msoBarRow is First or Last. I tried Last and it puts the clipboard tb under the last tool bar, but again in the correct horizontal location. If we can get it up one row, I think we will have it.

    Thanks again for your help.

  3. #3
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Word 2000 (SR-1) - Toolbar placement

    You might want to try the following:
    <pre>Sub cBarLoc()
    Dim cbar As CommandBar
    For Each cbar In CommandBars
    If cbar.Visible Then
    Debug.Print cbar.Name, cbar.Position, cbar.Left, _
    cbar.RowIndex, cbar.Height, _
    cbar.Width, cbar.Top
    End If
    Next
    End Sub
    </pre>

    I think this gets at all of the position properties.

    Then try setting the visible, position, rowindex, left, and top properties. Use the integer that you get from the placement you want for rowindex rather than the constant.
    <pre>Sub cBarPlace()
    With CommandBars("Clipboard")
    .Visible = True
    .Position = 1 'Top of screen
    .RowIndex = 9 'or whatever value you get
    .Left = 228 'or whatever value you get
    .Top = 26 'or whatever value you get
    End With
    End Sub
    </pre>


    This was fun. I hope it helps you. It helped me!
    I may add something along these lines to my page on <A target="_blank" HREF=http://www.addbalance.com/word/movetotemplate.htm> transporting customizations</A>.

    You may also want to look at and use the Context property to make sure that you are moving things where you think you are and set the saved property of that template to true so that you macro doesn't trigger a prompt about saving Normal.dot or your template when you exit Word.

    Finally, as a matter of housekeeping, could you edit your post to change the topic to "Word 2000 (SR-1) - Toolbar Placement." That way it will be easier for others to find.
    Charles Kyle Kenyon
    Madison, Wisconsin

  4. #4
    sidalp
    Guest

    Word 2000 (SR-1)- Toolbar Replacement

    Office 2000 has the facility to display a clipboard on the tool bar that can contain up to 12 items.
    However, the clipboard tool bar has to be envoked every time an initial Office application in opened.
    For Word 2000, MS has provided a work around, which is described in kb article Q224750, that involves
    creating a macro to open and position the clipboard tool bar. I have copied the macro and it works,
    but it places the clipboard tool bar below the second row of tool bars that I normally have open all
    the time. I have room at the right end of the first and second row of tool bars and would like to have
    the macro place the clipboard tool bar in either of those places, however, I can't figure out how to
    modify the macro to do it. I don't know VB but it appears that the position is determined by a statement
    that reads: .RowIndex = msoBarRowLast 'Dock below other toolbars. I have looked at Help which mentions
    a RowFirst and using this places the Clipboard tool bar ahead of my other toolbars. Help also indicates
    that an integer can be used, but when I tried this both after the = and instead of Last, I either got
    a syntax error or nothing happened. Can anyone tell me how to modify the macro to put the tool bar where
    I want it? Thanks

  5. #5
    sidalp
    Guest

    Re: Word 2000 (SR-1) - Toolbar placement

    Once again many thanks for your assistance. I ran the first macro and got the following: Std 1 0 6 26 757 26; Format 1 0 8 26 711 52; Menu 1 0 2 26 1024 0; Clipboard 1 711 8 26 169 52. I substituted what I believe to be the correct numbers in the second macro resulting in .Position = 1; .RowIndex = 8; .Left = 711; .Top = 52. The result was that the Clipboard tool bar is now positioned correctly on the desired row (Formatting Bar) at the left. The only problem is that the entire bar is shifted to the right such that a space that looks to be as wide as the Clipboard appears at the left. If we could shift the whole tool bar (Formatting and the Clipboard together) to the left edge, we would have it. Any ideas on how to do this?
    Incidently, I went to change the topic and found that it already reads as you suggest. <img src=/S/cheers.gif border=0 alt=cheers width=30 height=16>

  6. #6
    sidalp
    Guest

    Re: Word 2000 (SR-1)- Toolbar Replacement

    Waiting for a reply to my last. Hopefully this last issue will wrap it up. Can anyone help me with it? <img src=/S/grovel.gif border=0 alt=grovel width=31 height=23>

  7. #7
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Word 2000 (SR-1) - Toolbar placement

    Run the macros again after you put the toolbars where you want them. Position both toolbars using a macro.
    Charles Kyle Kenyon
    Madison, Wisconsin

  8. #8
    sidalp
    Guest

    Re: Word 2000 (SR-1) - Toolbar placement

    Charles, thanks again. Ran the data macro again and set up the following macro with results:

    Sub AutoExec()
    '
    ' AutoExec Macro
    ' Macro created 7/7/2001 by Nils Hokansson
    '
    With CommandBars("Formatting")
    .Visible = True
    .Position = 1 'Top of screen
    .RowIndex = 8 'or whatever value you get
    .Left = 0 'or whatever value you get
    .Top = 52 'or whatever value you get
    End With
    With CommandBars("Clipboard")
    .Visible = True
    .Position = 1 'Top of screen
    .RowIndex = 8 'or whatever value you get
    .Left = 711 'or whatever value you get
    .Top = 52 'or whatever value you get
    End With
    End Sub

    As you can see, I have set this up to run as an AutoExec so that the Clipboard Tool Bar is opened and positioned when Word opens. For some reason it appears not to run correctly. The Clipboard Tool Bar appears at the end of the Formatting Tool Bar, but the latter is still shifted right. The funny thing is that if I manually run the macro after opening Word, the tool bars are shifted left where I want them to be. What am I missing? Why does the macro work when I invoke it manually and work partially when I let it work automatically? <img src=/S/doh.gif border=0 alt=doh width=15 height=15>

Posting Permissions

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