Toolbar button change caption 
Author Message
 Toolbar button change caption

I have toolbar buttons to toggle "Track Changes", "Show
changes" and "Print Changes" off and on.  For example, on
the "Track Y/N" button:

Sub TrackChangesToggle()
    With ActiveDocument
        If .TrackRevisions = True Then
            .TrackRevisions = False
        Else
            .TrackRevisions = True
        End If
    End With
End Sub

It's easy to tell if the "Show Changes" is on just by
looking at the document.  However, I want to change the
caption of the other two so I know which way the toggle is
set.  So instead of "Track Y/N" I would show either "Track
Y" if true or "Track N" if false.

I lieu of this, can you change the text or button color to
show green if true, or red if false?

Finally, with the buttons on my normal template, how can I
be sure the buttons updated to show the correct status
when I bring up an existing document?

Thanks



Sun, 24 Oct 2004 04:14:14 GMT  
 Toolbar button change caption
Hi Steve,

I don't know if this will work, but have you investigated the CopyFace and
PasteFace methods?

HTH

Quote:
> I have toolbar buttons to toggle "Track Changes", "Show
> changes" and "Print Changes" off and on.  For example, on
> the "Track Y/N" button:

> Sub TrackChangesToggle()
>     With ActiveDocument
>         If .TrackRevisions = True Then
>             .TrackRevisions = False
>         Else
>             .TrackRevisions = True
>         End If
>     End With
> End Sub

> It's easy to tell if the "Show Changes" is on just by
> looking at the document.  However, I want to change the
> caption of the other two so I know which way the toggle is
> set.  So instead of "Track Y/N" I would show either "Track
> Y" if true or "Track N" if false.

> I lieu of this, can you change the text or button color to
> show green if true, or red if false?

> Finally, with the buttons on my normal template, how can I
> be sure the buttons updated to show the correct status
> when I bring up an existing document?

> Thanks



Mon, 25 Oct 2004 20:27:48 GMT  
 Toolbar button change caption
Hi Steve,

The usual way for this kind of "on/off" button would be to use one
Caption or button face, and make the button look pressed/depressed
(like the buttons for "bold"/"italic"...).

But changing the text is also possible.
The following example should show you which properties to look up in
the online help:

  Dim myCBB As CommandBarButton

  Set myCBB = CommandBars.ActionControl
  myCBB.Caption = "Track: Yes"
  myCBB.State = msoButtonDown

Regards,
Klaus - Word MVP

Quote:

> I have toolbar buttons to toggle "Track Changes", "Show
> changes" and "Print Changes" off and on.  For example, on
> the "Track Y/N" button:

> Sub TrackChangesToggle()
>     With ActiveDocument
>         If .TrackRevisions = True Then
>             .TrackRevisions = False
>         Else
>             .TrackRevisions = True
>         End If
>     End With
> End Sub

> It's easy to tell if the "Show Changes" is on just by
> looking at the document.  However, I want to change the
> caption of the other two so I know which way the toggle is
> set.  So instead of "Track Y/N" I would show either "Track
> Y" if true or "Track N" if false.

> I lieu of this, can you change the text or button color to
> show green if true, or red if false?

> Finally, with the buttons on my normal template, how can I
> be sure the buttons updated to show the correct status
> when I bring up an existing document?

> Thanks



Tue, 26 Oct 2004 00:18:33 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Changing toolbar button caption

2. No more caption when changing button image in toolbar

3. Changing Toolbar Button Properties Outside of the Toolbar

4. First Button on Toolbar Has No Caption

5. Toolbar button caption does not support ALT keys

6. toolbar button captions

7. toolbar control - Wordwrap in button's caption needded

8. Toolbar: Button with Bold Caption.

9. Toolbar: Button with Bold Caption.

10. Toolbar Button Caption , What FONT?

11. Toolbar: Button with Bold Caption.

12. Toolbar: Button with Bold Caption.

 

 
Powered by phpBB® Forum Software