Using the MSProject application object from another application or process

D

daveg

Hi all,

I've seen a couple of posts along this line but no resolution.

I'm trying to instantiate Pro 2003 from an aspx page, open a project
in it from server 2003, make a couple of changes, publish it and
close.

I've got the aspx page running as a domain account (mine at the mo')
with an account in Project Server, but it opens in offline mode even
though the default account uses the server.

Dim app As New Microsoft.Office.Interop.MSProject.Application
app.FileOpen("<>\newTest.Published")
'I get an offline error popup

Is there some way of getting it to use an account connecting to
Project Server?

Thanks

Dave G
 
J

Jason-W

Dave,

I had a similar problem, where I wanted to launch MSP from
Excel & have it make changes to a project located on
project server. Rod Gill had posted this code that worked
for me:

x = Shell("Winproj.exe /S
http://servername/projectserver /U username
/P password", vbHide)
DoEvents 'this gives Project time to logon
'Create a project application:
Set objMSProject = CreateObject("MSProject.Application")
DoEvents


The original thread can still be found here:
http://tinyurl.com/6tzn4 (links to the thread on Google)

The list of switches available on MSP command line can be
found here:
http://tinyurl.com/69gnq (link to MS site)

I hope this helps.
--Jason
 
D

daveg

Hi Jason,

Thanks for the reply.

Yep, I saw the same code in another forum, but it didn't work for me
(and is also fugly).
I was hoping there might be a more elegant way of doing this, it seems
like such a kludge.

I'll revisit my code and see what i was doing wrong. I guess it may be
that i'm stuck with this technique.

cheers

dave
 

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