I’m using Microsoft’s XML office and word references and their specific CSS style to generate a Word doc with reasonably sophisticated layout including header and footer for each page.
It’s working. The generated Word doc usually spans across several pages. The only problem is that the last page has an extra header in the middle of the page and its footer hidden behind it. It’s visually unpleasant and I can’t deliver the solution to my client. Since Word has @page CSS reference, I wonder if it has some thing like @lastpage or @last_page or mso-last-page for Word special CSS reference, if so, I would try to set it to false or none and see if it would remove the extra header and footer for the last page.