Reply
 
Thread Tools Display Modes
  #1   Report Post  
Mo
 
Posts: n/a
Default How to override Words built-in "Draw a table"-function

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

  #2   Report Post  
Doug Robbins - Word MVP
 
Posts: n/a
Default How to override Words built-in "Draw a table"-function

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

"Mo" wrote in message
...
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



  #3   Report Post  
Mo
 
Posts: n/a
Default How to override Words built-in "Draw a table"-function

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:

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

"Mo" wrote in message
...
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




Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can you use Track changes and the insert override function togeth. FrankT Microsoft Word Help 1 September 23rd 05 01:32 PM
How many times are words used in a document. Marker Microsoft Word Help 4 March 9th 05 04:55 AM
Word frequencies Anthea Microsoft Word Help 6 January 10th 05 04:46 AM
how to override spell checks blue underlined words Lee Microsoft Word Help 1 December 29th 04 03:05 AM
Word Count mel Microsoft Word Help 2 December 14th 04 10:17 PM


All times are GMT +1. The time now is 12:49 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"