Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 09-19-2015, 06:43 PM
CodingGuruInTraining CodingGuruInTraining is offline Combining 2 tables into 1 and use Table2's column widths (hoping for workaround dealing merged cells Windows Vista Combining 2 tables into 1 and use Table2's column widths (hoping for workaround dealing merged cells Office 2010 32bit
Novice
Combining 2 tables into 1 and use Table2's column widths (hoping for workaround dealing merged cells
 
Join Date: Sep 2015
Posts: 13
CodingGuruInTraining is on a distinguished road
Default Combining 2 tables into 1 and use Table2's column widths (hoping for workaround dealing merged cells

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!
Reply With Quote
 

Tags
column width, combine, tables



Similar Threads
Thread Thread Starter Forum Replies Last Post
Combining 2 tables into 1 and use Table2's column widths (hoping for workaround dealing merged cells Table will not allow sorting because "cells are merged". I can't find the merged cells. 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
Combining 2 tables into 1 and use Table2's column widths (hoping for workaround dealing merged cells VBA code to fix column widths molesy Excel 3 09-16-2013 12:51 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:06 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft