By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,550 Members | 1,189 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,550 IT Pros & Developers. It's quick & easy.


P: 1
Hi Experts,

I'm both very new to Python and to VBA, so my question may well be a simple one but i'm tearing my hair out

Basically i get a different excel files produced in any number after running a certain job and so the file names change for each job.

I have written a macro via vba to do some sorting and create a presentation in PP.

Now i want to combine hte 2 processes, but am having real trouble making my macro global and running the macro for each different file

Any help is much appreciated


Code Below

import win32com.client
xl = win32com.client.Dispatch("Excel.Application")
ppt = win32com.client.Dispatch("PowerPoint.Application")
xl.Visible = 1 #open MS Excel
ppt.Visible = 1 #open MS Powerpoint
xl.Workbooks.Open('Z:\\projects\\surveys\\SPSS - Generic files\\big output.xls')
xl.Workbooks.Open('Z:\\projects\\surveys\\SPSS - Generic files\\ChartsToPresentation.xla')
xl.Application.ExecuteExcel4Macro("!PERSONAL.XLS!C hartsToPresentation")
Oct 11 '06 #1
Share this question for a faster answer!
Share on Google+

Post your reply

Sign in to post your reply or Sign up for a free account.