Thank you for your quick replies, and I apologise for my delayed response.īoth Andrew's and Graham's codes work perfectly (I added a few lines to Andrew's to convert all caption styles to my default paragraph style as the caption style left too big a space). And of course his "Update All Documents in a Folder" macro is gold
Seeing what way people code who actually know how to code is very informative.Īnd thanks also to Macropod, the space at the top of the page doesn't bother me now like I said, but it may become an issue in future. I'm not sure what settings I've changed, but the tables are no longer pasting as butted together so the mentioned strange problem has taken care of itself apparently as well as the problem with adding a row instead of separating the tables. (Both problems were occurring before I stripped the extra lines out of the code by the way). It was doing something very strange for a while if I traced through it with the F8 key instead of "running" it: when it came to the butting tables it would copy the first page of the document and paste it onto the end of the document while deleting the original last page. Thanks again.Įnd SubIt works perfectly except for when tables are butted in which case it adds a row to the top of the bottom butting table instead of separating them (I don't know why, because if i place the cursor in the same place (the collapse position) and select "split table" manually it works, i.e. On the other hand, I'm aware you're not under any obligation of course. So if you (or anyone else) can answer my question without unreasonable trouble I'd be grateful. I keep my questions until something comes up that appears to me as though it would be relevant to a number of other problems I have, and would give me a better understanding of VBA coding (i think it's obvious I'm still at the 'struggling' stage). I don't like to impose on the advisors on this forum, so I usually spend a lot of time trying to figure out what i know said advisors could answer in less than two minutes. To me at least, it seems my solution is the most straightforward.Īlso, increasing the space before and after a paragraph doesn't introduce a space between two tables that butt each other. The two suggestions you've made introduce a number of issues I'd rather avoid. The space at the top of the page doesn't really bother me to be honest. I use widow/orphan control so blank lines at the bottom of a page is common regardless.