<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
<font class="fixed_width" face="Courier, Monospaced">(This is a cross
post from the Python mailing list where unfortunately nobody responded.
I would be very grateful if someone could give me some insights!)<br>
<br>
Dear all, <br>
</font>
<p><font class="fixed_width" face="Courier, Monospaced">I have written
a Python script that runs on Windows XP with Python 2.5 <br>
and uses Internet Explorer to 'pretty print' some HTML output. This <br>
has been working perfectly fine for a few years until recently IE was <br>
upgraded to version 8. Now occasionally Python throws an error that <br>
originates from the win32com.client.Dispatch() method and has <br>
description 'OLE error 0x800704a6'. (Occasionally means that sometimes <br>
it happens, sometimes it doesn't. I haven't been able to figure out <br>
what the trigger exactly is.) The most recent version of win32com is <br>
installed. Google on the error code didn't give me a lot of hits, and <br>
no useful ones. <br>
</font></p>
<p><font class="fixed_width" face="Courier, Monospaced">So, I was
hoping somebody might be able to give me some pointers what <br>
might be going on. <br>
</font></p>
<p><font class="fixed_width" face="Courier, Monospaced">Here is the
relevant (very straightforward) Python code: <br>
</font></p>
<p><font class="fixed_width" face="Courier, Monospaced">import
win32com.client <br>
</font></p>
<p><font class="fixed_width" face="Courier, Monospaced">class IE: <br>
def __init__(self,url=None,vis=0,standalone=False): <br>
#Pas registerwaardes aan voor het printen: <br>
if not standalone: <br>
self.regOld=self.getRegValues() <br>
self.setRegValues <br>
({'margin_left':'0.00000','margin_right':'0.00000','footer':'','header':''}<wbr>)
<br>
#Start instantie van IE op: <br>
self.ie=win32com.client.Dispatch <br>
('InternetExplorer.Application') <br>
self.ie.Visible = vis <br>
if url!=None: <br>
self.ie.Navigate(url) <br>
</font></p>
<p><font class="fixed_width" face="Courier, Monospaced">and the class
furthermore implements some methods to open & print some <br>
HTML-file. <br>
</font></p>
<p><font class="fixed_width" face="Courier, Monospaced">Unfortunately I
only have a screenshot of the error: <br>
<a target="_blank" rel="nofollow"
href="http://www.google.com/url?sa=D&q=http://tweakers.net/ext/f/cAdKjyjs7w4yZRu6s4RqNwjW/full.png&usg=AFQjCNEHr-QJwwMhc9AyTj-w46fL20XX9Q">http://tweakers.net/ext/f/cAdKjyjs7w4yZRu6s4RqNwjW/full.png</a>
<br>
</font></p>
<font class="fixed_width" face="Courier, Monospaced">Thanks in advance
for your thoughts, Kees </font><br>
<br>
<br>
</body>
</html>