VB Automation to Microsoft Project Server

ErnestForman used Ask the Experts™
We have code that can access mpp files via the Project API.  Now we would like to do this with projects stored on Microsoft Project Server but don’t know how to establish the connection. Can you explain how and/or provide a reference to do this?
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®

there are followin 2 methods:
1) Project Data services - Soap interface you can create new project , create new task , buil team prom enterprise , modify project properties but you can't modify existing tasks.
2) You can use Project Proffesional to connect to Project server and when you open the file you will be able work with it using Project Pro Objects


I think you are close to the answer I'm looking for. I'd like to do 2) above but don't know how to specify the ADO connection string to Project Server to connect to the desired project. Can you give an example?

Sub ttt()
Shell "C:\Program Files\Microsoft Office\OFFICE11\winproj.exe /s http://w2003project/ProjectServer/"

Dim oApp As MSProject.Application
Set oApp = New MSProject.Application
oApp.Visible = True
oApp.FileOpen Name:="<>\hokus pokus.Published"
End Sub

I don know how to control connectrion state from VBA code so i used  the SHELL command with switch /s
/s - URL
/u user name (for project auth)
/P password (for project auth)


Can you explain what the shell command is doing? That is, what is the result of doing the shell?
Can you explain what the "<>\hokus pockus.Publsished" is supposed to be?

the shell comand executes the MSProject application, the result of this code is that MS Project Pro is opened on your computer and is connected to MS Project server.

"<>\hokus pockus.Publsished"  is name of the project on project server, "<>\" means that this project is stored on project server.


I think this is enough for us to give it a try.  Can you give me a reference to where information such as <>\ is explained.


I have no idea :) i found this convention in recorded macro.
Irwin SantosComputer Integration Specialist

No comment has been added to this question in more than 21 days, so it is now classified as abandoned.
I will leave the following recommendation for this question in the Cleanup topic area:

Accept - winzig

Any objections should be posted here in the next 4 days. After that time, the question will be closed.

EE Cleanup Volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial