Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.tables
Kobus Botha Kobus Botha is offline
external usenet poster
 
Posts: 1
Default Joining two tables

How do you line up columns of two tables with the same number of columns with
one another before joining them.
  #2   Report Post  
Posted to microsoft.public.word.tables
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Joining two tables

If you increase the zoom and then hold down the Alt key as you adjust the
columns widths, you should be able to get things to line up.

If however, that is too difficult, the following macro will append the data
from the second table in a document to the first table in the document

Dim source As Table
Dim target As Table
Dim newRow As Row
Dim i As Long, j As Long
Dim data As Range
With ActiveDocument
Set target = .Tables(1)
Set source = .Tables(2)
End With
With source
For i = 1 To .Rows.Count
Set newRow = target.Rows.Add
For j = 1 To .Columns.Count
Set data = .Cell(i, j).Range
data.End = data.End - 1
newRow.Cells(j).Range.Text = data.Text
Next j
Next i
.Delete
End With


--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"Kobus Botha" Kobus wrote in message
...
How do you line up columns of two tables with the same number of columns
with
one another before joining them.



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Joining together 2 tables in Word blnorwood Tables 1 October 10th 08 09:22 PM
Joining Tables Idaho Word Man Microsoft Word Help 6 July 9th 08 11:15 PM
joining tables Janette Tables 1 September 17th 07 08:10 PM
Joining two different tables and making them as one Sally J Tables 1 March 16th 06 09:03 PM
Joining tables Jackie Smith Microsoft Word Help 5 December 16th 05 04:36 PM


All times are GMT +1. The time now is 02:32 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"