import os
import comtypes.client
def export_presentation(path_to_ppt, path_to_folder):
if not (os.path.isfile(path_to_ppt) and os.path.isdir(path_to_folder)):
raise "Please give valid paths!"
powerpoint = comtypes.client.CreateObject("Powerpoint.Application")
# Needed for script to work, though I don't see any reason why...
powerpoint.Visible = True
powerpoint.Open(path_to_ppt)
# Or some other image types
powerpoint.ActivePresentation.Export(path_to_folder, "JPG")
#这里可以写成:
#Presentation.Slides[1].Export("C:/path/to/jpg.jpg","JPG",800,600);
powerpoint.Presentations[1].Close()
powerpoint.Quit()
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有