![]() |
|
#3
|
||||
|
||||
|
Hi knightmetal,
Your macro doesn't actually apply the autofit attrinbute. Rather, it sets a preferred width which will remain fixed regardless of changes to margins etc. A true autofit macro is more like: Code:
Sub Autofit() Application.ScreenUpdating = False Dim Tbl As Table For Each Tbl In ActiveDocument.Tables Tbl.AutoFitBehavior (wdAutoFitWindow) Tbl.AllowAutoFit = True Next Application.ScreenUpdating = True Application.ScreenRefresh MsgBox "Done", vbOKOnly End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Macro for selecting pages and formatting of tables
|
ubns | Word VBA | 25 | 08-15-2012 11:48 PM |
Formatting multiple tables and columns efficiently?
|
table_column | Word Tables | 1 | 07-02-2012 05:55 PM |
| Another Case of Automatic/Zombie Formatting of Tables | MKummerfeldt | Word Tables | 0 | 10-31-2011 10:40 AM |
Copy table cell formatting across multiple cells / tables
|
pakistanray | Word Tables | 2 | 10-31-2011 08:07 AM |
| Whacked formatting in tables (2007) | Roscoe | Word Tables | 6 | 06-11-2010 02:48 PM |