How to override Words built-in "Draw a table"-function

M

Mo

Hi there,

what is the MacroName for the function, found in the toolbar, to insert a
table by dragging the mouse and selecting desired number of rows and columns?
I need to override the checkbox .AllowAutoFit = True when a new table is
created that way.
By overriding the Macro TableInsertTable in the desired template I can set
..AllowAutoFit = False which is the desired behaviour. It looks like this:
Sub TableInsertTable ()
With Dialogs(wdDialogTableInsertTable)
If .Show = -1 Then
Selection.Tables(1).AllowAutoFit = False
End If
End With
End Sub

TIA,
Peeter
 
D

Doug Robbins - Word MVP

ActiveDocument.Tables.Add Range:=Selection.Range, NumRows:=2, NumColumns:=2,
AutoFitBehavior:=False


--
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
 
M

Mo

Well, what I need is to keep the ability to use the button in the Standard
toolbar, the one that allows you to create the table by "choosing" the number
of rows and columns with the mouse, and still set the attribute
AutoFitBehavior:=False.
To do so I don't know any other way than to override the built-in
function/macro in Word. And for that I need the name of the function.
/Peeter

"Doug Robbins - Word MVP" skrev:
 

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