Thank you buddy. I got it both running. The code is really awesome now.
I will keep ask you some questions, you can be free to ignore me whenever you want.
I followed your advice about the formatting and did this:
Code:
With Selection.ParagraphFormat
.KeepWithNext = True
End With
But there is still a problem. The "Agente" title table sometimes is being left in one page and the table data in the other one.
What I thought to do is to merge the Table Agente with the data table below. I know this will require to change the structure of the code and I also don't know how hard can this change affect the whole code.
Could you give me a light again please?
Thanks!