#2
|
||||
|
||||
I don't know what you mean by (1).
For (2), you should define a Style with the required attributes. For (3), you could use the following macro, provided you change "MyStyle" to whatever Style name you create in (2): Code:
Sub TableOptimize() Dim myTable As Table If Selection.Information(wdWithInTable) = False Then Exit Sub Set myTable = Selection.Tables(1) With myTable .Range.Style = "MyStyle" .AutoFitBehavior (wdAutoFitContent) .AutoFormat Format:=wdTableFormatContemporary '35 .AutoFitBehavior (wdAutoFitWindow) .AutoFitBehavior (wdAutoFitFixed) End With End Sub PS: Please use code tags (see the advanced tab) when posting code.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Table of Contents Formatting Problem | WilltheGrill09 | Word | 1 | 01-08-2012 12:57 PM |
Formatting text in a table of contents | newbie | Word | 1 | 12-28-2009 02:48 AM |
Number formatting in Word table | 8braitp | Word Tables | 0 | 08-27-2009 04:12 AM |
Table of contents after formatting! | erika | Word | 1 | 06-10-2009 10:40 AM |
Table of Contents Formatting | Rick5150 | Word | 1 | 03-16-2009 11:10 AM |