Win32::OLE->FreeUnusedLibraries (); Win32::OLE->Initialize(Win32::OLE::COINIT_MULTITHREADED); my $app; my $project; eval{ $app = Win32::OLE->new('MSProject.Application') or print "Couldn't open project '$MSPfilename'\n"; $app->{'DisplayAlerts'} = 0; $app->{'Visible'} = 0; $app->{'AskToUpdateLinks'} = 0; $app->OptionsGeneral(0,0,0); $app->FileOpen($MSPfilename); }; if ($@) { my $msg = "A problem was encountered when accessing thefile '$MSPfilename'\n" . Win32::OLE->LastError()."\n"; print "$msg\n"; } $project = $app->{Projects}->Item(1); if($app) { if (($project) && $project->Tasks) { my $count = $project->Tasks->Count(); for my $indx (1..$project->Tasks->Count()) { my $Task = $project->Tasks($indx); $Task->{Cell}->{Name}->{CellColor} = 1; } }#End of if appTasks loop. $project->Save(); }#End of if app loop. $app->Quit();