+ 2
Python: How can i change in docx file with a code all coloured letters to italic style the same letters?
2 Réponses
+ 1
First, install the module at https://pypi.org/project/JUMP_LINK__&&__python__&&__JUMP_LINK-docx/.
Second, check the official help page at https://python-docx.readthedocs.io/en/latest/user/styles-using.html#apply-a-style.
Third, build your own code.
Some ideas:0.open the file. 1.find all coloured letters. 2.store them in a variable. 3.delete the letters in the docx. 4.apply italic styles to the letters in the variable and add them to the docx. 5.close the file.
+ 1
Thank you a lot for the guidance!!