Disabling (greying out) menu commands

S

Sol Apache

Hello

I have a few menu and toolbar commands which are macros which I created to
be used in tables only.

In order that users won't complain that the macro doesn't work when they
click on any of them outside of a table (even though the Menu is called
<Company> Tables), can I have such commands greyed out in both the menus and
a custom toolbar when the cursor or the selection is not in a table?

Thanks for any help.
 
D

Doug Robbins

Maybe, but it might be easier to include this in your code:

If Selection.Information(wdWithInTable) Then
'Your commands
Else
MsgBox "The selection must be inside a table."
End If


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP
 
S

Sol Apache

Thanks Doug
I have been working on other things this past week, hence the delay in
replying. Your suggestion will help end users¹ confusion if greying out is
too difficult to do.

Sol
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top