G
Glenn Sasscer
I have a macro creating a table and formating the column widths in Word 2000,
where it works perfectly. In Word 2003 or 2007, it skips the width
formating.
Code:
ActiveDocument.Tables(1).Cell(1, 1).Select
Selection.Columns.PreferredWidthType = wdPreferredWidthPoints
Selection.Columns.PreferredWidth = InchesToPoints(1.1)
ActiveDocument.Tables(1).Cell(1, 2).Select
Selection.Columns.PreferredWidthType = wdPreferredWidthPoints
Selection.Columns.PreferredWidth = InchesToPoints(4.2)
ActiveDocument.Tables(1).Cell(1, 3).Select
Selection.Columns.PreferredWidthType = wdPreferredWidthPoints
Selection.Columns.PreferredWidth = InchesToPoints(2.25)
In Word 2003 or 2007, if I stop the macro just before these lines adn F8
through each line, the widths work. If I stop it just before these lines and
just after these lines, it widths do not work.
Any suggestions?
- Glenn
where it works perfectly. In Word 2003 or 2007, it skips the width
formating.
Code:
ActiveDocument.Tables(1).Cell(1, 1).Select
Selection.Columns.PreferredWidthType = wdPreferredWidthPoints
Selection.Columns.PreferredWidth = InchesToPoints(1.1)
ActiveDocument.Tables(1).Cell(1, 2).Select
Selection.Columns.PreferredWidthType = wdPreferredWidthPoints
Selection.Columns.PreferredWidth = InchesToPoints(4.2)
ActiveDocument.Tables(1).Cell(1, 3).Select
Selection.Columns.PreferredWidthType = wdPreferredWidthPoints
Selection.Columns.PreferredWidth = InchesToPoints(2.25)
In Word 2003 or 2007, if I stop the macro just before these lines adn F8
through each line, the widths work. If I stop it just before these lines and
just after these lines, it widths do not work.
Any suggestions?
- Glenn