[Tutor] closing a internet explorer com object

Jeff Peery jeffpeery at yahoo.com
Tue Jun 24 20:33:24 CEST 2008


hello,
  I'm using internet explorer to print out html documents and I'm not sure how to close it once it is created. How do I do this? below is the simple bit of code I use to print documents.
   
  thanks!
  Jeff
   
          ie = win32com.client.Dispatch("InternetExplorer.Application")
        ie.Visible = 0
        ie.Navigate(doc_name)
        if ie.Busy: sleep(1)
        # print the current IE document without prompting
        # the user for the printerdialog
        ie.ExecWB(win32com.client.constants.OLECMDID_PRINT, 
          win32com.client.constants.OLECMDEXECOPT_DONTPROMPTUSER)

       
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20080624/3bbf108b/attachment.htm>


More information about the Tutor mailing list