yet another go at minimizing ppt 2013

This commit is contained in:
Tomas Groth 2014-06-18 14:11:52 +02:00
parent 1e4c08746c
commit b0081a68b0

View File

@ -139,8 +139,13 @@ class PowerpointDocument(PresentationDocument):
self.presentation.Application.ActiveWindow.WindowState = 2 self.presentation.Application.ActiveWindow.WindowState = 2
except: except:
log.error(u'this failed: "self.presentation.Application.ActiveWindow.WindowState = 2", trying option 2...') log.error(u'this failed: "self.presentation.Application.ActiveWindow.WindowState = 2", trying option 2...')
log.error(sys.exc_info()[0]) log.error(sys.exc_info())
self.presentation.Application.WindowState = 2 try:
self.presentation.Application.WindowState = 2
except:
log.error(u'option 2 failed as well')
log.error(sys.exc_info())
return True return True
except pywintypes.com_error as e: except pywintypes.com_error as e:
log.error(u'PPT open failed') log.error(u'PPT open failed')
@ -306,8 +311,12 @@ class PowerpointDocument(PresentationDocument):
self.presentation.Application.ActiveWindow.WindowState = 2 self.presentation.Application.ActiveWindow.WindowState = 2
except: except:
log.error(u'this failed: "self.presentation.Application.ActiveWindow.WindowState = 2", trying option 2...') log.error(u'this failed: "self.presentation.Application.ActiveWindow.WindowState = 2", trying option 2...')
log.error(sys.exc_info()[0]) log.error(sys.exc_info())
self.presentation.Application.WindowState = 2 try:
self.presentation.Application.WindowState = 2
except:
log.error(u'option 2 failed as well')
log.error(sys.exc_info())
def get_slide_number(self): def get_slide_number(self):
""" """