Closed finevine closed 2 years ago
I've manage to achieve what I wanted:
# add tabs
for p in document.paragraphs:
if p.text.find("[!TAB]") > 0:
p.text = p.text.replace("[!TAB]", "\t")
I add in my template [!TAB]
and replace it with python with \t
Glad you were able to solve it!
Hi, Is there a way to add tab_stops ? I manage to add them in the style but not in the html.
with this link I think it's possible : https://python-docx.readthedocs.io/en/latest/api/document.html#docx.document.Document.add_paragraph I've tried to add an html comment and replace it by a `\t``
But it doesn't work so far.
Thanks!