How do I dynamically change font styles/colors?

N

nuge

Hey all, I'm a new MS Project (2007 or any other version) user who is running
into a process issue with updating tasks and items.

I have a project document with well over 2000 individual tasks that I need
to track, with a good portion of those tasks already at 100%. I'd like to be
able to dynamically assign a font color (or style) to tasks that are complete
so they can be easily distinguished against non-complete tasks.

Can anyone suggest a script/formula that I may be able to use or apply to
achieve this?

The format painter doesn't seem to work as it resets itself everytime I
paint a style. I currently achieve this by manually select the task, open
the font dialog and change the color to green or grey.

Any help is greatly appreciated!

Ted
 
J

Jan De Messemaeker

Hi Nuge,

You can script this in VBA indeed.

Following is an example (Coloring finished tasks green)

Sub FinishedGreen()
Dim Ctr as integer

Viewapply "Gantt Chart"
Outlineshowalltasks
filterapply "All Tasks"
selectall
for ctr=1 to activeselection.tasks.count
selectrow row:=ctr,rowrelative:=false
if not activeselection.tasks(1) is nothing then
if activeselection.tasks(1).percentcomplete=100 then
font color:=pjgreen
end if
end if
next ctr
end sub

If you know some VBA, this may set you on the way to more elaborate cases.

Also, you can use the highlighting feature of filters for this:

Build a filterof modify an existing one (Project, Filtered for, More
filters..)
Click "Highlight" when editing the filter
Format, Text Styles, select a color for highlighted tasks

Hope this helps
 

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