Open Enterprise Global Template using COM and C#(VB.NET)

M

Mikaelo

Hello!

How to open Ent Global Template using Project COM components ?
I know how to open common project from server using FileOpen, but what name
i must use for open global template ?

I need this to modify base calendars using BaseCalendarDateEdit method.

Thanks
 
M

Mikaelo

Thanks

But what about CheckIn ?
I found method EnterpriseFileCheckin(SaveType) in MSDN, but this methid is
absent
VS doesn't show it in list of available methods.

How to checkin global enterprise template ?
 
M

Mikaelo

very simple! :) thanks

I try to use COM componet from Project with C#.

I make simething like
using Microsoft.Office.Interop.MSProject;

ApplicationClass app = new ApplicationClass();
app.EnterpriseGlobalCheckOut();
app.FileClose(PjSaveType.pjSave);
app.Quit(PjSaveType.pjDoNotSave);

but when i run this, i get

Unhandled Exception: System.Runtime.InteropServices.COMException
0x80004005): The method is not available in this situation.

What does it mean ?

Thanks!
 
G

Gary L. Chefetz [MVP]

Ed:

Could it be that the identity he's using to run the COM app isn't clearing
PDS authentication? The error seems to point toward a permission problem,
not a code problem.
 
E

Ed Morrison

Mikaelo,
Gary's correct. How are you opening MS Project Pro? You can not use the
COM object to open Project and connect to the server. You have to use a
command line or shell app. The format is winproj.exe /s serverurl /u
projectuser /P password where serverurl is the project server url (ex
http://myserver/projectserver). You only need projectuser and password if
you are trying to connect using a Project Authenticated User. Otherwise,
make sure the user that is running your app has the correct permissions.

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

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