mohanprasadgutta has asked for the wisdom of the Perl Monks concerning the following question:
can you please let me know where i am doing wrong. thanks in advance.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 '$MSPf +ilename'\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();
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: MS project Task name cell color
by moritz (Cardinal) on May 11, 2008 at 11:14 UTC | |
by mohanprasadgutta (Initiate) on May 11, 2008 at 11:25 UTC |