use strict; use Win32::OLE qw(in with); use Win32::OLE::Const 'Microsoft Outlook'; $|++; $Win32::OLE::Warn = 3; # Die on errors my $OL = Win32::OLE->GetActiveObject('Outlook.Application') || Win32::OLE->new('Outlook.Application', 'Quit'); my $NameSpace = $OL->GetNameSpace("MAPI"); my $Contacts = $NameSpace->Folders("Public Folders")->Folders("All Public Folders")->Folders("Test"); my $contact_items = $NameSpace->Folders("Public Folders")->Folders("All Public Folders")->Folders("Test")->{Items}; my $it = $contact_items->GetFirst; #get the first item foreach my $item (in $Contacts->{Items}){ $it->{Categories} = "New Categories Value"; ## Code needed here to save the above new value? $it = $contact_items->GetNext; }