Having seen what you're trying to do, it's apparent the end result is much different from what you sought in:
https://www.msofficeforums.com/word-...nd-values.html. Rather, it seems that the current problem is a result of your inadequate problem description there; almost exactly the same code could have been used.