[python-win32] Error when trying to open a Microsoft Project file

Daryl Spitzer daryl.spitzer at gmail.com
Wed May 30 18:55:42 CEST 2007

I'm trying to open a Microsoft Project file using the following:

>>> from win32com.client import Dispatch
>>> a=Dispatch("MSProject.Application")
>>> a.Visible=1
>>> a.FileOpen("C:\test.mpp")

...but I get this error message.

Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "<COMObject MSProject.Application>", line 8, in FileOpen
com_error: (-2147352567, 'Exception occurred.', (1004, 'Microsoft
Office Project', 'Project cannot open the file.', 'C:\\Program
Files\\Microsoft Office\\OFFICE11\\VBAPJ.CHM', 131072, 0), None)

Project (Standard 2003 SP1) will open C:\test.mpp just fine interactively.

Can anyone tell me why I'm getting this error message?  What is that
'C:\\Program Files\\Microsoft Office\\OFFICE11\\VBAPJ.CHM' file?  It
doesn't exist in that location, but I found it in C:\Program
Files\Microsoft Office\OFFICE11\1033\.  I tried copying it to
C:\Program Files\Microsoft Office\OFFICE11\ but I get the same error.

Daryl Spitzer

More information about the Python-win32 mailing list