W
Will Nelson
Thank you in advance
I have a macro to format a Word table. In particular, I wish to set the width of columns to a particular standard. The code appears as follows
Selection.Tables(1).Columns(1).Selec
Selection.Columns.PreferredWidthType = wdPreferredWidthPoint
Selection.Columns.PreferredWidth = myWidt
Selection.ParagraphFormat.Alignment = wdAlignParagraphCente
The above is repeated for all of the columns in the table by using a different value in the Columns() argument. The value of MyWidth changes from column to column
At the end, there is the following line of code
Selection.Tables(1).AutoFitBehavior (wdAutoFitFixed
Here is the issue. If I single step through this code the table formats perfectly. However, if I run the macro (all at once) none of the column widths "take"
I give up
Thanks
W
I have a macro to format a Word table. In particular, I wish to set the width of columns to a particular standard. The code appears as follows
Selection.Tables(1).Columns(1).Selec
Selection.Columns.PreferredWidthType = wdPreferredWidthPoint
Selection.Columns.PreferredWidth = myWidt
Selection.ParagraphFormat.Alignment = wdAlignParagraphCente
The above is repeated for all of the columns in the table by using a different value in the Columns() argument. The value of MyWidth changes from column to column
At the end, there is the following line of code
Selection.Tables(1).AutoFitBehavior (wdAutoFitFixed
Here is the issue. If I single step through this code the table formats perfectly. However, if I run the macro (all at once) none of the column widths "take"
I give up
Thanks
W