Это мой код.
import comtypes.client
import os
input_file=input("Enter the file path")
output_path=os.path.splitext(input_file)[0]
powerpoint=comtypes.client.CreateObject('Powerpoint.Application')
pdf=powerpoint.Presentations.Open(input_file,WithWindow=False)
pdf.SaveAs(output_path,32)
pdf.Close()
powerpoint.Quit()
После запуска этого кода я получаю эту ошибку, может кто-нибудь ее решить.
Enter the file pathC:\Users\Futuresoft\Desktop\chapter1 quantum theory.pptx
Traceback (most recent call last):
File "f:\webapp\convert.py", line 8, in <module>
pdf.SaveAs(output_path,32)
_ctypes.COMError: (-2147467259, 'Unspecified error', (None, None, None, 0, None))