Tony
Mon Aug 11 06:26:43 CDT 2003
As Martinique pointed out, the macro name to use is
TableInsertTable.
When I looked at the Word Command list, TableInsertTable
does not appear. What appears is InsertTableGeneral. But
when I select InsertTableGeneral, the Run button stays
greyed out.
If I assign a shortcut key to InsertTableGeneral it will
run and if I have a macro by the same name that will run
instead.
Curiously, TableInsertTable has a wdDialog constant for
use with the dialogs collection.
I initially looked at what was being run by the Insert
table menu without success. I compared its settings with
that of Format Paragraph (which also launches a dialog
box). I couldn't see any significant difference.
Curiously neither had a "onAction" setting. So I simply
set the onAction for the table menu using
Dim ctl As CommandBarButton
Set ctl = Application.CommandBars("Menu Bar").Controls
("T&able").Controls("&Insert").Controls("&Table...")
ctl.OnAction = "TableInsertGeneral"
Cheers
TonyS.
>-----Original Message-----
>Good point Cindy,
>
>I was only working off theory. I hadn't realised that
this little
>beastie was different.
>
>I guess you could replace the toolbar button with one
pointing to the
>macro, as another respondent suggested, but I am sure you
probably
>already know this.
>
>I will now indulge in a little S&M <g>
>
>Cheers
>TonyS.
>
>
>Cindy Meister -WordMVP- <CindyMeister@swissonline.ch>
wrote in message news:<VA.00008064.00bf5e6a@speedy>...
>> Hi Tony,
>>
>> > You need to create a macro with the same name as the
insert table
>> > function "not sure of the exact name).
>> >
>> Have you found any way to intercept the toolbar button?
I've never
>> been able to catch that with an InsertTable macro...
>>
>> Cindy Meister
>> INTER-Solutions, Switzerland
>>
http://homepage.swissonline.ch/cindymeister (last
update Jan 24
>> 2003)
>>
http://www.mvps.org/word
>>
>> This reply is posted in the Newsgroup; please post any
follow
>> question or reply in the newsgroup and not by e-mail :-)
>.
>