Text-Replace in docx and save the changed file with python-docx
问题 I'm trying to use the python-docx module to replace a word in a file and save the new file with the caveat that the new file must have exactly the same formatting as the old file, but with the word replaced. How am I supposed to do this? The docx module has a savedocx that takes 7 inputs: document coreprops appprops contenttypes websettings wordrelationships output How do I keep everything in my original file the same except for the replaced word? 回答1: As it seems to be, Docx for Python is