[python-win32] Application.Visible Inquiry

Matthew.Thompson2 at shell.com Matthew.Thompson2 at shell.com
Mon Jul 9 17:58:53 CEST 2012


Hello,

I am currently working on a program that extracts all of the text content out of Microsoft office files (word, powerpoint, excel).  I have been able to successfully extract content out of each of the file types using the extension, but there is one strange issue that I have noticed.

For powerpoint files, my function requires the line of code: "Application.Visible = True"  in order to work. Without that line I get this error:

File "<COMObject <unknown>>", line 3, in Open
com_error: (-2147352567, 'Exception occurred.', (0, u'Microsoft Office PowerPoint 2007', u'Presentations.Open : Invalid request.  The PowerPoint Frame window does not exist.', u'', 0, -2147188160), None)

With the doc, docx, xls, and xlsx filetypes, my functions for those types do not require the "Application.Visible = True" line in order to work. I'm wondering if there is anything that can be done to eliminate that line of code from the ppt and pptx function to avoid having to open a new powerpoint window for every  file I parse.

Any input from on this topic would be greatly appreciated!

Thank you,
Matthew

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-win32/attachments/20120709/2037a6e5/attachment.html>


More information about the python-win32 mailing list