8000 Problem saving PowerPoint files as PDFs · Issue #175 · enthought/comtypes · GitHub
[go: up one dir, main page]

Skip to content
Problem saving PowerPoint files as PDFs #175
@petgriffin

Description

@petgriffin

Hi

I have a similar issue to this one (comtypes 1.1.7):

#129

My code snippet is

import comtypes.client

ppFormatPDF = 32

for fname in ["test1", "test2"]:
in_file = fname + ".pptx"
out_file = fname + ".pdf"
app = comtypes.client.CreateObject('Powerpoint.Application')
ppt = app.Presentations.Open(in_file)
ppt.SaveAs(out_file, FileFormat=ppFormatPDF)
ppt.Close()
app.Quit()

This seems to work OK saving test1.pptx as a PDF but trying to save the next one results in this error:

ppt.SaveAs(out_file, FileFormat=ppFormatPDF)
_ctypes.COMError: (-2147188720, None, ('Presentation (unknown member) : Object does not exist.', 'Microsoft PowerPoint', '', 0, None))

Would appreciate any thoughts you may have - thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    3rd-party issuerelated to specific windows stuffs or python packages

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0