I have been experimenting with formatting tables using putdocx table. I have a dataset with 514 observations (districts) and am required to present some data in supplementary tables for every district. (Ours is not to reason why. For the benefit of potential re-users, I will also provide the data in excel format.)

The tables run over several pages; the least I can do is try to make them more readable by repeating the two header rows on every page. This was working in an earlier version of the code, when I was using just one header row, and varnames:

Code:
putdocx table tablea =  data(var1 var3 var3), varnames headerrow(1)
Now I have added another line and prettied up the column headings, and the headerrow is no longer repeating

Code:
putdocx table tablea =  data(var1 var3 var3 var8),headerrow(2) layout(autofitcontents)
putdocx table tablea(2,2) = ("Province"),