This is a strange one. I am using code to add rows to a table. The table begins looking like this:
«tablestart:mytable»«Col1» | «Col2» | «Col3»«tableend:mytable» |
---|
Then I run this code:
For x = 1 to 5
Table1.rows.add(table1.lastrow.clone(true))
Next
It adds the rows, but then I want to run the ExecuteWithRegions method:
doca.MailMerge.ExecuteWithRegions(dt)
On that line of code I get the error “Found end of mail merge region ‘mytable’ without matching start.” When I look at the document it now looks like this:
«Col1» | «Col2» | «Col3»«tableend:mytable» |
---|---|---|
«Col1» | «Col2» | «Col3»«tableend:mytable» |
«Col1» | «Col2» | «Col3»«tableend:mytable» |
«Col1» | «Col2» | «Col3»«tableend:mytable» |
«Col1» | «Col2» | «Col3»«tableend:mytable» |
«Col1» | «Col2» | «Col3»«tableend:mytable» |
The ExecuteWithRegions line of code errors out, so it did not run, because the lastrow.clone method used to add rows creates this table. How do I just add rows that are blank, not having the merge fields in them?