Привет всем, есть вопрос по docx. Мне нужно на первую строчку документа добавить информацию, но не получается, если просто использовать add_paragraph он добавляет на след. странице, а мне надо на первой.
Hello everyone. Need help with docx. I need change document for add paragraph in first line of document. But i don't know how i can realize it. Sry for my english :)
from docx import Document
f = open('manual.docx', 'rb')
document = Document(f)
document.sections[0].headers[0].add_paragraph(text='moar header')
document.save('test.docx')
f.close()
AttributeError: 'Section' object has no attribute 'headers'