win32 com problem

Mike P michael.pearmain at tangozebra.com
Tue Dec 5 06:12:13 EST 2006


Thanks for the quick reply,

the code i am running is the following

import win32com.client
xl = win32com.client.Dispatch("Excel.Application")
ppt = win32com.client.Dispatch("PowerPoint.Application")
ppt.Visible = 1 #open MS Powerpoint
xl.Visible = 1 #open MS Excel
xl.Workbooks.Open('%s/working_output.xls' % (working_dir))
xl.Workbooks.Open('Z:\\projects\\surveys\\SPSS - Generic
files\\CTP.xla')
ppt.Presentations.Open('Z:\\projects\\surveys\\SPSS - Generic
files\\Basic Template.ppt')
xl.Application.Workbooks("working_output").Activate
xl.Application.Run("CTP.xla!sheet1.CTP")

I'm running via SPSS V15 which has a python plugin, i was previousky
running in V14 using the exact same code with no problems?

Thanks again 

Mike




More information about the Python-list mailing list