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
_______________________________________________
Python-win32 mailing list
Python-win32@python.org
http://mail.python.org/mailman/listinfo/python-win32

Reply via email to