[python-win32] Running Excel Macros from Python

thor vollset thor at tordivel.no
Thu May 15 21:11:43 EDT 2003


# this script runs the "Skrivut883" macro
# when excels quits - the user are prompted to save - is there a way to avoid this prompt?
 
from win32com.client import Dispatch
myExcel = Dispatch('Excel.Application')
myExcel.Visible = 1
myExcel.Workbooks.Add('c:\Termoetiketter1_2.xls')
myExcel.Run('Skrivut883')
myExcel.Quit()

Thor Vollset
----------------------------------------------------------------------------------
TORDIVEL AS Storgata 20 0184 Oslo Norway
Tel:      +47 23 15 87 00       Fax: +47 23 15 87 01
E-mail: thor at tordivel.no       Web: http://www.tordivel.no
----------------------------------------------------------------------------------
Scorpion Vision Software - Eliminates your weakest link
----------------------------------------------------------------------------------

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-win32/attachments/20030515/15929e30/attachment.htm


More information about the Python-win32 mailing list