Пример кода:
Код: Выделить всё
from pptx import Presentation
nameOfFile = "NewPowerPoint.pptx" #Replace this with: path name on your computer + name of the new file.
def open_PowerPoint_Presentation(oldFileName, newFileName):
prs = Presentation(oldFileName)
prs.save(newFileName)
open_PowerPoint_Presentation('Template.pptx', nameOfFile)
Проблема в том, что этот «Template.pptx» содержит все старые номера недель. это, как «20 неделя». Я хочу, чтобы Python нашел и заменил все эти словосочетания на «Неделя 25» (например).
Подробнее здесь: https://stackoverflow.com/questions/379 ... ext-ctrl-h