There are several anomalies in your code which makes it difficult to follow exactly what it is that you are trying to achieve and therefore it is difficult to determine why the error is occurring ... especially without access to the documents themselves.
e.g. You have made reference to 'inText2' without actually using inText2 and you appear to have counters 'CompliantCount' and 'DecisionCount' which both appear to be duplicates of the variable 'Row'?
The MainDoc appears to have at least 5 tables (not 4 as previously mentioned) with no error handling to determine that the document is valid.
__________________
Graham Mayor - MS MVP (Word) (2002-2019)
Visit my web site for more programming tips and ready made processes www.gmayor.com
|