You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
document = Document()
document.add_paragraph('start')
for i in 'text':
document.add_paragraph(i, style='ListNumber')
document.add_paragraph('continue')
for i in 'text':
document.add_paragraph(i, style='ListNumber')
document.add_paragraph('end')
document.save('demo.docx')
You can add to the feature request if you like. I'll close this one as a duplicate.
If you're interested in working on it let me know. There are several dependencies though, namely access to styles and numbering definitions, that aren't in place yet. So it would be a bigger job than just the numbering restart itself.
Activity
scanny commentedon Aug 15, 2014
Hi @ilnurgi, the business of restarting numbering for a numbered list in Word turns out to be quite complex. There's already an open feature request for it here: #25. Also see this response to a similar question on StackOverflow: http://stackoverflow.com/questions/23446268/python-docx-how-to-restart-list-lettering/23464442#23464442.
You can add to the feature request if you like. I'll close this one as a duplicate.
If you're interested in working on it let me know. There are several dependencies though, namely access to styles and numbering definitions, that aren't in place yet. So it would be a bigger job than just the numbering restart itself.