Emanuel Sotelo wrote:
#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
Well, you don't need to mess with Device Contexts
in order to print from Word. As with most "How
do I do this in MS Office?" questions, the answer
is: record a macro which does what you want, and
then look at the resulting VBA code and reproduce
it in Python -- which is usually trivial.
TJG
_______________________________________________
python-win32 mailing list
python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32