There is a whole bunch of code in that attachment that has nothing to do with what we've been discussing in this thread. Once again, it looks like you've been cobbling together sets of quite unrelated code. Evidently, the extra is from:
https://www.msofficeforums.com/word-...matically.html. And nowhere in either thread have you given any indication I can see that both macros were intended to work together. Consequently, pretty much everything done in this thread has been a waste of time - a complete re-write would be required for code that would work with the process in the other thread. I don't propose to do that.
Likewise, I doubt Graham will be amused to find how much difference the project's scope really is from what he's seen so far in that other thread. That code, too, would require substantial re-working.