Call ComAddin from a macro.

M

M-CL

I've an MSProject(2000) that runs once a week, so I'm trying to build a

macro that generates reports based on resource names however I have to
change the Project StartDate. I know very litle about VB, and read that

the correct way to this is running the COMAddin AdjustDates.Can someone

help me with an example how to call this within a macro?


TIA
 
K

Kaduru

Hi M-CL,

Can you please explain a bit more about your requirement.

Let me put in words, what i have understood.

You want to reschedule the assignments if there is remaining work for
them at the end of the week. (or is it the start date of the project?)
I can't find any method as AdjustDates in the project object model.

If what i understood above is correct, then you can accomplish this as
follows.

DateTime oNewdate = new DateTime(2006,2,5);
objProject.ActiveProject.Application.UpdateProject(true,oNewdate,PjProjectUpdate.pjReschedule);


If you are writing that in a macro, the macro has to be recorded on
global, in order to apply this to all the projects.

Thanks & regards
Sudhakar
 
J

Jan De Messemaeker

Hi,

Adjust dates used to be a macro supplied with Project, but since 2000 it is
an add-in.
It changes Project start date and all other dates in the program (including
constraint dates!!) but not actual dates.
Should you find someone with Project 98 installed you can see the code.
HTH
 
M

M-CL

Thank you Kaduru.
Yes, I want to reschedule in the start date of the project.
I tried the code you post, but I get a compile error :
Expected : end off statement in ...DateTime(2006,2,5);
Can you please help me ?
TIA
 

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