+ 2

Python: How can i change in docx file with a code all coloured letters to italic style the same letters?

28th Dec 2019, 7:46 AM
Νικος Παγκαλης
Νικος Παγκαλης - avatar
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.
29th Dec 2019, 2:25 AM
PRO
PRO - avatar
+ 1
Thank you a lot for the guidance!!
29th Dec 2019, 7:47 AM
Νικος Παγκαλης
Νικος Παγκαλης - avatar