Now the document I receive has changed format. (This is out of my control.) It's a .docx and it has ten or more tab positions. I don't want any of these, I just want my old left, centre, and right back. (I want all three because I fill them by hand in the header: it's not just about the automatic pagination.) I've read anything I can find about headers, tabs, and styles, without finding an answer. I don't use tabs in the body text, only in the header and footer. Here is the relevant code, cut down to essentials:
Code: Select all
styles = doc.stylefamilies.getbyname("PageStyles")
style = styles("default")
cur = style.footertext.text.createtextcursor
style.footertext.text.insertstring(cur, chr(9) & "page ", 0)