file propertity...

J

Joy

in our MS project, we will send our ms project file data to the server. on
the server side, the unit is fixed to hours.

if we change work unit from hours to weeks, or days, or sth like that. and
then send the data to the server. we still want the data correct.

like on our ms project file, work is 8 days. then on the server side, the
value should be 64, which is 8*8

I did it like this: before we send data to the server, I change work unit to
hours:

For i = 1 To proj.Tasks.Count
With proj.ProjectSummaryTask
OptionsSchedule workunits:=pjHour
End With
Next

Then, after that, I change work unit back to user's preference. so on the
user side, nothing really changes.

now, the issue comes, say, if user change work unit to Weeks, and send the
data to the server. after that, the work unit is week, which is OK
but suppose the user then change work unit from week to day, and send the
data to the server. very strangely, after that, the work unit is week,
instead of day!! I guess this is because although it appears that work unit
changes, but to MS project, it does not acturally changes.

I tried and found we have to open file propertites first (just open it, and
do nothing and then close it)
FileProperties ' show file properties

then, everything is OK. except, the filepropertities will have to be opened
and user has to bother to close it.

we do not like this

is there any way to let the file propertities open and close it itself? so
user does not have to bother to close it themselves...

or is there any other better way to deal with this issue?

thanks!!
 
J

Jack Dahlgren MVP

A few things:

1) The server does not care about the units. They are only used for display
in the local client. Duration is internally stored in minutes. That is why
you divide duration by minutes per day to get days. A 1 day task will show a
duration of 480 in the server.
2) Your code does not make sense below - why do you loop through each task
and then set the values for project summary task only? You are setting the
project display property as many times as you have tasks.

-Jack Dahlgren
 
J

Jack Dahlgren MVP

I think Work is stored in tenths of minutes (minutes/10).
Divide by 4800 for days.

-Jack Dahlgren
 

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