[python-win32] Weird Word/Com behavior?

Bill Witherspoon Bill Witherspoon" <bwitherspoon@emseal.com
Tue, 12 Nov 2002 09:45:10 -0500


This is a multi-part message in MIME format.

------=_NextPart_000_0026_01C28A30.30CCB2E0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

I have an app that opens a word document, and then
modifies/adds text to it.
If I use a network copy of the word doc it works fine.

In an effort to speed up the program I copied the word
doc locally. Now it gives me this error:

File"<ComObject<unknown>>", line 2 in Add
pywintypes.com_error:(-2147352567, 'Exception Occurred',
(0, 'Microsoft Word', 'This document template doesn't exist.,
'c:\\Program Files\\Microsoft Office\\Office\\1033\\wdmain9.chm',
241617, -2146823151), None)

I think wdmain9.chm is an old-style help file, not a template.
It *does* exist on the local computer. Same behaviour on other
computers regardless of Win97, Win2K.

Any ideas what's going on?

TIA,
Bill

------=_NextPart_000_0026_01C28A30.30CCB2E0
Content-Type: text/html;
	charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<META content=3D"MSHTML 5.50.4522.1800" name=3DGENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=3D#ffffff>
<DIV><FONT face=3DArial size=3D2>I have an app that opens a word =
document, and=20
then</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>modifies/adds text to it.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>If I use a network copy of the word doc =
it works=20
fine.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>In an effort to speed up the program I =
copied the=20
word</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>doc locally. Now it gives me this=20
error:</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>File"&lt;ComObject&lt;unknown&gt;&gt;", =
line 2 in=20
Add</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>pywintypes.com_error:(-2147352567, =
'Exception=20
Occurred',</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>(0, 'Microsoft Word', 'This document =
template=20
doesn't exist.,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>'c:\\Program Files\\Microsoft=20
Office\\Office\\1033\\wdmain9.chm',</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>241617, -2146823151), =
None)</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>I think wdmain9.chm is an old-style =
help file, not=20
a template.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>It *does* exist on the local computer. =
Same=20
behaviour on other</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>computers regardless of Win97, =
Win2K.</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>Any ideas what's going on?</FONT></DIV>
<DIV><FONT face=3DArial size=3D2></FONT>&nbsp;</DIV>
<DIV><FONT face=3DArial size=3D2>TIA,</FONT></DIV>
<DIV><FONT face=3DArial size=3D2>Bill</FONT></DIV></BODY></HTML>

------=_NextPart_000_0026_01C28A30.30CCB2E0--