How can i tell if in server mode?

G

Guest

Hello!
I have an MS Project Addin that requires the user to save the file to their
harddrive. The addin automatically saves. This Addin works great, as long
as MSProject is not connected to the server.

Now that I have users that are, by default, connected to the server, I need
to modify my code to auto save as a .mpp file, NOT to the server.

So I have a couple questions with recommended approach to:

1. What is the recommeneded Project property to determine if the project
came from the server? I see ServerURL as a Project property. It appear
that if it is empty, then it is offline, otherwise it is from a server. Is
this the recommended Project property to use to test if it is connected to
server?
2. How can i force the save as mpp to local harddrive? Right now, I am
calling App.FileSave which brings up the save to server by default if the
application is in server mode. Can I force the save as mpp file dialog?
3. Can i query if the application is in server mode or offline mode? i
look at help and nothing is standing out to query to find this?

I appreciate any help!

Dan
 
R

Rod Gill

Hi,

Serverurl is as good as any, plus projects saved to Server also have
..Published at the end of the name.

Try recording a macro of you saving to Project Server and saving to local
drive whilst connected to Project Server. The recorded code will provide
your answer.
 
K

Kishore

Hi Dan,
We can use "Profiles.ActiveProfile.ConnectionState" property to see whether
Project Pro is Online or Offline. It returns 0 = pjProfileOffline, 1 =
pfProfileOnline

Three Different Connection Status (Scenarios):
In "Project Server Accounts window"
Connection Button Clicked ConnectionState
Property
My Computer Work Offline 0
MyProjServer Connect 1
MyProjServer Work Offline 0

Hope it helps....

Regards,
Kishore Dodda
 
G

Guest

Exactly what I needed!

Thanks,
Dan
Kishore said:
Hi Dan,
We can use "Profiles.ActiveProfile.ConnectionState" property to see
whether
Project Pro is Online or Offline. It returns 0 = pjProfileOffline, 1 =
pfProfileOnline

Three Different Connection Status (Scenarios):
In "Project Server Accounts window"
Connection Button Clicked ConnectionState
Property
My Computer Work Offline 0
MyProjServer Connect 1
MyProjServer Work Offline 0

Hope it helps....

Regards,
Kishore Dodda
 

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