AttributeError: 'POINTER(IUnknown)' object has no attribute 'Presentations'

问题描述
python操作pptx的代码,之前正常运行。现在却报错:

AttributeError: 'POINTER(IUnknown)' object has no attribute 'Presentations'

解决办法
增加dynamic = True

powerpoint = comtypes.client.CreateObject("Powerpoint.Application",dynamic = True)

参考
1、https://www.qinyushop.com/archives/64.html

你可能感兴趣的:(AttributeError: 'POINTER(IUnknown)' object has no attribute 'Presentations')