Method 'FileOpen' of object '_MSProject' failed

F

Fal Marrelle

I have a VBA automation which, in turn, opens a series of projects added to a
Collection, thus, where f is a valid projectname in the collection and source
is a valid version:

FileOpen "<>\" & f & "." & Source, ReadOnly := True

very occasionally (and always at the same file) I get the subject message
(Method 'FileOpen' of object '_MSProject' failed). Any ideas how I can
determine what is causing the failure? (Opening the offending file using the
user interface never fails).

I have tried promoting the file to the start of the collection (anticipating
that the error could be one of memory on the client hardware . . . even when
the offending file opens first we sometimes see failures). I also added a 5
second wait after issuing the FileOpen command - the problem persists.

Interestingly, if I resume execution after failure the line does not fail a
second time, but neither does the file open succesfully.
 
J

Jim Aksel [MVP]

The file in question does open sometimes but not others?
Hmm. What version of Project are you using, and might there be a
discrepancy of project versions in the files you are opening in the
collection?

Can you reproduce the problem outside of the collection? That is, just open
the one file without putting in the collection first. I have had trouble
with FileOpen and FileOpenEX.
 
F

Fal Marrelle

Jim,

Thanks for the response. We are using Project Server 2003.

All FileOpen requests evaluate to a valid online ".Published" reference.
The file opens maybe 9 times in ten for each of 6 users on a variety of
platforms . . . some running XP some Vista.

I will try hardcoding the FileOpen requests outside of the collection -
that's good direction, thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top