View Single Post
 
Old 02-08-2022, 05:44 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

This works for me.
Code:
Sub JoinTables()
  Dim aRng As Range
  Set aRng = Selection.Range
  Do While aRng.Tables.Count > 1
    aRng.Tables(aRng.Tables.Count).Range.Previous(Unit:=wdParagraph).Delete
  Loop
End Sub
I'm pretty sure it will have problems if one or more of the tables are floating (have text wrap turned on).
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote