Error opening Project mpp with C#

M

Mike Bradshaw

Hello all, I've been searching for a while for an answer to this problem and
hope someone here can help.

I'm trying to open an MPP (Project 2007) with C# (2008) using FileOpen()
passing a Type.Missing as directed by several examples I've found on the net.
However, I keep getting "An unexpected error occured. The database could not
be initialized because it is not configured correctly, it does not support
required functionality, or it is not installed on your computer. Contact your
system administrator for the database."

I am not using Project Server so I'm at a loss as to what database the error
message could be referring to.

Any help would be appreciated. Thanks!
 
R

Rod Gill

Without seeing your code I can only suggest recording a macro in VBA of you
opening a project and doing whatever else you want to do then converting the
recorded code to C#. You may well realise that VB is much faster when coding
control of office apps (optional parameters and better intellisense) and
cheaper and quicker to maintain!!

--

Rod Gill
Microsoft MVP for Project

Author of the only book on Project VBA, see:
http://www.projectvbabook.com
 
M

Mike Bradshaw

Thanks Rod. Before I saw your reply - I noticed that I was passing the MPP
file name as "<blah.mpp>" rather than "blah.mpp". A leftover from the sample
I was using. I guess the angle brackets tell the FileOpen method to use
project server rather than a local file.
 

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