![]() |
#1
|
|||
|
|||
![]()
Dears,
I'm facing some troubles when formatting tables using VBA in Microsoft Word. Basically, I've Word Document with more than 1,000 tables Each table may have lines with one, four, five, or, six columns. Each table must have a 15 cm width (no matter the number of columns). If the table has 6 columns, the distribution of the widths must be: 1st column: 1.4 cm, 2nd column: 1.4 cm, 3rd column: 7.3 cm 4th column: 1.6 cm 5th column: 1.6 cm 6th column: 1.7 cm If the table has 5 columns, the distribution of the widths must be: 1st column: 1.4 cm, 2nd column: 1.4 cm, 3rd column: 8,9 cm 4th column: 1.6 cm 5th column: 1.7 cm If the table has 4 columns, the distribution of the widths must be: 1st column: 1.4 cm, 2nd column: 1.4 cm, 3rd column: 10,5 cm 4th column: 1.7 cm I've been trying to work with the ".setwidth" statement, but it's not working perfectly. "... .SetWidth ColumnWidth:=CentimetersToPoints(1.71), rulerstyle:=wdAdjustFirstColumn" Please, check the picture below: As you can see, the cells are not perfectly aligned. What's the best way to format tables and make sure that independently of the number of columns they will always be aligned? Thanks |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Changing font size in tables | rogercorke | Word Tables | 0 | 01-26-2022 01:39 AM |
Slide size issue | mjm925 | PowerPoint | 2 | 04-08-2019 10:59 PM |
PDF Conversion Issue - Background Tiled Image Size Issue | dustpie | Word | 1 | 10-23-2016 07:33 PM |
![]() |
bclear16 | Word | 6 | 08-22-2016 11:31 PM |
Reducing size of tables and graphs | Phil Pense | Word | 0 | 01-30-2012 05:40 AM |