• Text Box in Toolbar (Word 2000)

    Author
    Topic
    #411695

    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?

    Viewing 3 reply threads
    Author
    Replies
    • #894364

      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

      • #894431

        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.

        • #894478

          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.

        • #894479

          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.

      • #894432

        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.

    • #894365

      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

    • #894400

      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:

      • #894429

        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.

      • #894430

        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.

    • #894401

      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:

    Viewing 3 reply threads
    Reply To: Reply #894430 in Text Box in Toolbar (Word 2000)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information:




    Cancel