![]() |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
Hello,
I am trying to create a Word macro that will adjust every table in a document to have specific column widths. These documents I work with can vary anywhere from 15 pages to 1000 pages with varying table lengths, but always with 4 columns. The problem is there are merged cells (both vertical and horizontal) in each table and they are needed for this project, so they have to stay. I have been searching for days, but I have not been able to find a code that truly works around this issue. Since it looks like VBA can't modify a table with merged cells, I thought it might be possible to make a new table the way I want it formatted and then combine that with a table in the document. Is it possible to create a macro that can perform the following actions and if so, how would it look in VBA: 1) Find table (Table1) 2) Add new 1x4 table (Table2) above (or below if it matters) Table1 with desired column widths ' this would basically be a copy header row found on every table in document 3) Combine (snap together) Table1 and Table2, using Table2's column widths ' if not possible, then perhaps Table2's "table width" will work 4) Delete 2nd row (formerly 1st row) in each table 5) Next table Any advice would be appreciated! |
Tags |
column width, combine, tables |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
wendyloooo | Word Tables | 1 | 05-26-2015 01:19 PM |
Splitting one column into two with two different widths | officeboy09 | Excel | 6 | 12-15-2013 09:48 PM |
Pasting tables from Excel 2010 into Word 2010 - How to fix column widths? | GracieB | Word | 7 | 10-02-2013 06:24 AM |
Adjusting column widths | norwood | Word VBA | 0 | 09-24-2013 06:53 AM |
![]() |
molesy | Excel | 3 | 09-16-2013 12:51 PM |