Generate mpp file from Project Server

B

bhaskar_412

Hi All,

We have a requirement where we need to open a mpp file from our ASP.NET
application, with all the task information for that project from Microsoft
Project Server 2007. Is there a way to achieve it?

Thanks
Bhaskar
 
S

Sandro

hi Bhaskar,

why you need an extra asp.net application????
save your mpp file in projectserver and publish the project.

with pwa you can see all informations about this project.....


sandro
 
B

bhaskar_412

I got your point, but this is what the customer is looking for.

Thanks
Bhaskar
 
B

bhaskar_412

Hi Peter,

Thanks for your reply. But the problem is I am using ASP.NET and if the user
clicks a button on one of the page in the application, I need to open MS
Project on the client system along with project data.


Thanks
Bhaskar
 
R

Rod Gill

Hi,
Try something like:

On Error Resume Next
'Uses Windows Authentication as no username or password parameters added

Shell "winproj.exe /s http://my_servername_here/instance_name_here"
Do Until Not (projApp Is Nothing)
DoEvents
Set projApp = GetObject(, "MSProject.Application")
Loop
Debug.Print projApp.Name
Debug.Print projApp.Profiles.ActiveProfile.ConnectionState

If Project is already open you will need to close it first.
--

Rod Gill
Microsoft MVP for Project

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

bhaskar_412

Hi Rod,

Thanks a lot... I can see some light now. :) I tried the example you have
provided in you reply, but it seems that after executing -- Shell
"winproj.exe /s http://my_servername_here/instance_name_here", Microsoft
project is not opening. So the later part of the code is hanging the browser.

Thanks
Bhaskar
 
R

Rod Gill

It will take some time to load, hence the loop waiting for it. Make sure
Winproj isn't running already by checking the Windows Task Manager and
closing it if it is running, then try again.

It may start invisibly so try:
projApp.Visible=True

--

Rod Gill
Microsoft MVP for Project

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

bhaskar_412

Hi Rod,

I waited for around 30 min. But nothing shown up, nor Project opened nor I
can see it in task manager.

Thanks
Bhaskar
 
A

Amitav

Got a way to open project with a specific project loaded using vbscript.
Posting the code here to help others stuck with the same problem.

After a lot of head banging I could finally resolve it using the vbscript
code below -

Dim oShell
set oShell = CreateObject("WScript.Shell")
call oShell.Run("winproj /s http://msproject-test:3457/PWA /p ""password""
/u ""user"" ""<>\testproject""", 1, False)
 

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