I need to implement a design for word document. I have to programatically set the page layout to 2-column layout for that document using python-docx library. Please help.
okay I found a solution to this, 1. make a Document object 2. add some paragraphs 3. took the section[0] 4. queried the xpath for existing w:cols using cols = sectPr.xpath('./w:cols') 5. then set the 'num' property for w:cols using cols.set(qn('w:num'), "2")
worked for me...