Instantiating an Application object does not connect to Project Se

S

SRW

I am writing a utility that will open a series of projects located on a
Project Server and save them as files to a shared folder. Is there a way to
tell the Project Pro client to connect to a Project Server through the VBA
API? Running the Project Pro client normally always connects, but when I
instantiate an Application object it does not connect to the project server.

The utility works fine if the client is open and connected to the project
server, but I can't seem to figure out how to establish the connection when
it is not already open.

The project name syntax for the FileOpen() method for an enterprise project
is <>\[Project Name].Published. Is there special syntax to specify a project
server within that structure?

This is a win32 application written in C# using the project interop assembly.
 
E

Ed Morrison

In order to use the Project object model, you need to open up MS Project.
This can be done via the command line. See the links for details.

http://office.microsoft.com/en-us/assistance/HP010558681033.aspx
http://support.microsoft.com/default.aspx?scid=kb;en-us;308409

--
Ed Morrison
msProjectExperts
"We wrote the books on Project Server"
http://www.msprojectexperts.com
FAQ - http://www.projectserverexperts.com



SRW said:
I am writing a utility that will open a series of projects located on a
Project Server and save them as files to a shared folder. Is there a way to
tell the Project Pro client to connect to a Project Server through the VBA
API? Running the Project Pro client normally always connects, but when I
instantiate an Application object it does not connect to the project server.

The utility works fine if the client is open and connected to the project
server, but I can't seem to figure out how to establish the connection when
it is not already open.

The project name syntax for the FileOpen() method for an enterprise project
is <>\[Project Name].Published. Is there special syntax to specify a project
server within that structure?

This is a win32 application written in C# using the project interop
assembly.
 
S

SRW

Thanks for the information. I can't seem to get the command line arguments to
work, it almost looks like it assumes the domain account I provide is a
Project user. Anyways, the acceptable workaround was just to add a button to
launch Project from the utility and allow the user to log in themselves. Once
project is open and connected the rest of the operation works fine.
 
R

Rob

The examples from the links supplied by Ed got me going to connect and log on
to the project server.

However, I can't get the FileOpen to work in C#, getting invalid arguments
error from the exception thrown. Can you or someone supply an example call
to that method in C#?

thanks,
Rob
 

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