Force save baseline

B

Bill Raymond

Hi Esteban,

You can only do this with VBA (Visual Basic) script.
However, I would probably not have this happen
automatically just because someone is opening, editing or
saving a project.

You might consider using a custom field called,
say, "Approved". Then, have the code run and recommend a
baseline be saved at that point. You would also want to
run a test against the project to ensure that a baseline
has already been saved.

Hope this helps,

-Bill
 
W

William Raymond

Hi Esteban,

Unfortunately, I do not believe there is any code that can be written
against the Publish command in MS Project. I suppose you could write your
own, but I would probably create some code that saved the baseline and then
published the project. You could then rollout a new icon on the toolbar
(via the Global Template) that would perform all these initial steps for the
user. Below is an example you can play with...

Sub SaveBaselineAndPublish()
If ActiveProject.BaselineSavedDate(pjBaseline) = "NA" Then
BaselineSave (True)
PublishAllInformation
MsgBox "Baseline Saved"
Else
MsgBox "There is already a baseline. The baseline has not been
saved and the project has not been published."
End If
End Sub

To use the code, code to Tools->Macros->Visual Basic Editor and paste it
into the "General" area of the code window.

BTW: If you have any more questions related to this automation, please use
the microsoft.public.project.vba newsgroup.

Hope this helps!

-Bill
--
Microsoft Project MVP
http://www.capstone.com
wraymond at capstone dot com

Project FAQs: http://www.mvps.org/project/


Thanks Bill

It is a great idea, I would like to run the code when the
project is published, but how can I do that?, I mean,
¿where I put the code, How can I test a baseline has been
saved, kown the project is published?

¿maybe you can tell were can I find examples code to
manipulate project from VBA??

Thanks a lot
 

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