![]() |
#2
|
||||
|
||||
![]()
Try this version
Code:
Sub Results2() Dim i As Integer, iTables As Integer Dim aTbl As Table, tblLast As Table Dim aRng As Range, aRngEnd As Range iTables = ActiveDocument.Tables.Count Set tblLast = ActiveDocument.Tables(iTables) For i = 1 To iTables - 1 Set aTbl = ActiveDocument.Tables(i) Set aRng = aTbl.Range.Cells(1).Range If InStr(aRng.Text, "Worksheet") > 0 Then Set aRngEnd = tblLast.Range aRngEnd.Collapse Direction:=wdCollapseEnd aRngEnd.FormattedText = aTbl.Rows.Last.Range.FormattedText End If Next i End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
How to compile text from multiple tables into a cell in a nested table | jrooney7 | Word VBA | 2 | 03-11-2019 07:55 AM |
![]() |
BIMwit | Word Tables | 1 | 05-14-2015 09:50 PM |
Ink to Text lines are different lengths | raineysky | OneNote | 0 | 02-12-2015 11:21 AM |
![]() |
Metamag | Office | 3 | 05-09-2011 06:25 PM |
![]() |
dineshtgs | Word Tables | 1 | 04-07-2011 01:27 AM |