Python auto-numbering in headings to text [docx files]

a 夏天 提交于 2021-01-28 02:28:18

问题


I'm trying to find a way to convert headings' auto-numbering to text

In MS Word's VBA it is just:

Sub Test()
ActiveDocument.Range.ListFormat.ConvertNumbersToText
End Sub

but how about Python 3.x?


回答1:


Python-docx has the styles attribute. Documentation and examples of use here: http://python-docx.readthedocs.io/en/latest/user/styles-using.html



来源:https://stackoverflow.com/questions/49194396/python-auto-numbering-in-headings-to-text-docx-files

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!