hello, well this time i have to do someting more easier from python i create a 
excel document were a
 wrote a message, a number, and a have this number multiply by another with a 
formula. the a save de
 excel document.
 next in the same programa a create a word doucument were a also wrote a 
message, and what i want to
 do  is that a pass the result of this formula to the word document, put in the 
midle of the document with a
bigger font.
and last have the word document sent to a printe.
now a have started the code by mi self:

from win32com.client import Dispatch
import win32ui
#excel part
MYDIR='C:\\Documents and Settings\\Administrador\\My documents'
xl= Dispatch("Excel.Application")
xl.Visible=1
xl.Workbooks.Add()
xl.Cells(1,2).Value=" excel data sent to a word document"
xl.Cells(2,4).Value=3
xl.Cells(3,6).Formula='=D2*10'
xl.Save(MYDIR+'\\excelword.doc')

#word part
wordapp = Dispatch("Word.Application")
wordapp.Visible = 1
worddoc = wordapp.Documents.Add()
rango = worddoc.Range(0,0)
rango.InsertBefore('hi we are goin to bring the data from excel and have it 
print in word')
worddoc.SaveAs(MYDIR+ '\\wordexcel.doc')
rango.InsertAfter(xl.Cells(3,6))

#print part
dc= win32ui.CreateDC()
dc.CreatePrinterDC()
# i dont now what else is supposed to go in this part to send it to print

 but i now is fiil with a lote of flaws, if somebody cant help me by give some  
suggestions or how to 
improve the program i will open to your comments

_________________________________________________________________
Los mejores conciertos en exclusiva por MSN in concert
http://video.msn.com/?mkt=es-mx
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to