Results 1 to 7 of 7
  1. #1
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Christchurch, New Zealand
    Posts
    250
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Text Box in Toolbar (Word 2000)

    It is possible to add a text box to a toolbar (eg the formatting toolbar). I can do this but I don't know how to get the text box to DO anything. I would like it to display the style of the paragraph the insertion point is in.

    Does anyone know if this is possible?

  2. #2
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Text Box in Toolbar (Word 2000)

    It's (nearly) possible to do this with a DocumentChange event. If you then move the cursor (with the mouse or arror keys) the event will fire and you can update your toolbar. If the user changes the font or paragraph style then your event wouldn't get called, so the box would be incorrect.

    Why not simply use Tools > Customize > Commands > All Commands and drag the Font box (that you normally see on the formatting toolbar) to the place where you want it?

    StuartR

  3. #3
    5 Star Lounger
    Join Date
    Dec 2000
    Location
    Tallahassee, Florida, USA
    Posts
    901
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Text Box in Toolbar (Word 2000)

    Hi, Karen! The "out of the box" formatting toolbar has a style box on it which displays the style at the insertion point. If you haven't used it, then it's possible that Word has automatically hidden it. Or you may have accidently removed it from the toolbar.

    You can resurrect it:
    Karen

  4. #4
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Christchurch, New Zealand
    Posts
    250
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Text Box in Toolbar (Word 2000)

    Hi Karen,
    Yes I have the style box on the formatting toolbar. However, I don't want to be able to change the style here, just display what is selected.

    Thanks anyway for your input.

  5. #5
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Christchurch, New Zealand
    Posts
    250
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Text Box in Toolbar (Word 2000)

    Thanks Stuart. When I get a chance I'll have a play with a DocumentChange event. Why wouldn't the event get called if the user changed the font or paragraph - surely this is a change to the document?

    I don't want to see the Font box, and as I explained to Karen although the Style box shows me the current style it also enables me to change the style - something I don't want.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Text Box in Toolbar (Word 2000)

    You can add a copy of the Style dropdown to your toolbar, and disable it using VBA:

    CommandBars("MyToolbar").Controls(2).Enabled = False

    This is for the second control of the command bar named MyToolbar. It will display the current style, but the user won't be able to select a style in it.

  7. #7
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Christchurch, New Zealand
    Posts
    250
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Text Box in Toolbar (Word 2000)

    Thanks Hans, will try this as soon as I get to work.

Posting Permissions

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