View Single Post
 
Old 09-24-2015, 09:09 PM
CodingGuruInTraining CodingGuruInTraining is offline Windows Vista Office 2010 32bit
Novice
 
Join Date: Sep 2015
Posts: 13
CodingGuruInTraining is on a distinguished road
Default

Quote:
The basic table's creation (i.e. header row plus the two rows below that) is only part of what the code does. It then has to replicate as many of the non-header rows as are necessary to match the original table. An alternative, if your existing tables (which I haven't seen) were suitable, would be to forego creating a new table and just re-format the existing ones.
I was referring to my original strategy, although I was doubtful whether such a method was possible. Unfortunately, the merged cells prevent formatting the current tables unless there is a workaround that I have not come across yet. If this way works, then that is all that matters really.

I tried your code yesterday and it worked great on the tables, but it seems to paste over 5-6 lines of text inbetween tables. I am still trying to figure out how your code works, but I'm wondering if this issue has something to do with the following part:
Code:
With .Range.Paragraphs.Last.Next.Range
            .InsertBefore vbCr
In one affected part I removed an extra line and then ran the code, which removed all remaining text (more than the 5-6 lines) between these 2 tables.
In another part, removing an indent/tab on a line under a table removed 2 more lines than before. I am still playing around with other causes, but hopefully you know more about this cause than I do.
Reply With Quote