A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

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



 
 
Thread Tools Display Modes
  #1  
Old November 2nd, 2005, 03:40 PM
Mo
external usenet poster
 
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  
Old November 3rd, 2005, 09:18 PM
Doug Robbins - Word MVP
external usenet poster
 
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  
Old November 10th, 2005, 02:25 PM
Mo
external usenet poster
 
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




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I find if there are doubles in my list of words? Rhen General Discussion 3 June 9th, 2005 05:12 AM
Running Access from network Alan Fisher Using Forms 4 July 3rd, 2004 02:37 AM
Logical Function Override Peo Sjoblom Worksheet Functions 2 February 26th, 2004 02:16 PM
Function not evaluated Srinivas Chundi Worksheet Functions 1 January 31st, 2004 07:37 PM
Function to convert Number into words jer Worksheet Functions 1 November 29th, 2003 01:08 PM


All times are GMT +1. The time now is 02:18 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.