Print a Word documentTag(s): WinAPI/Registry


oleObject ole_1
string ls_result
ole_1 = CREATE OLEObject
ole_1.ConnectToNewObject("word.application")
ole_1.documents.open("C:\realhowto.doc")
ole_1.selection.typetext(ls_result)
ole_1.activedocument.PrintOut(FALSE)
ole_1.activedocument.PrintOut()
ole_1.activedocument.close(0) 
ole_1.quit()
ole_1.disconnectObject()
DESTROY ole_1

blog comments powered by Disqus