Open Project Pro connected to Server from VB.Net

S

Scott

I'm hoping someone can assist me with this. I have code in vb.net that opens
project pro - however project pro is opening but it's not connected to
project server, which is the default setting. I get the following error;

You selected a project that was saved to Project Server. Project is unable
to open the selected project. To open projects saved to project server, close
and then reopen project. In the project server accounts dialog box, click
the correct account, and then click connect to establish a connection with
project server.

If i run the code when project pro is open, it runs fine.

Here's how i'm opening project;
Dim pApp As Microsoft.Office.Interop.MSProject.Application
Dim fileName As String
Dim folderName As String, reportingDate As Date

pApp = CreateObject("msproject.application")
pApp.Visible = True
 
B

Boaz Lev [MSFT]

Hi Scott,

With out having the benefit of having your full code sample (for some
reason, your code snippet is not complete -- maybe my mail client is
faulty), I can only venture a guess. You state that the default setting is
to open Project but not connected. Is that correct? If that is indeed the
case, I think this works as it should: If you set up your Project Pro client
to start disconnected, I would consider it a security problem if you could
all of a sudden using automation fire up Project Pro in connected mode.

I hope I am making my point clear... If I misunderstood, please give a
holler :)

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