Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
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 $folder="TestFolder"; my $Contacts = $NameSpace->Folders("Public Folders")->Folders("All Pub +lic Folders")->Folders("Corporate Contacts")->Folders($folder); my $contact_items = $NameSpace->Folders("Public Folders")->Folders("Al +l Public Folders")->Folders("Corporate Contacts")->Folders($folder)-> +{Items}; foreach my $item (in $Contacts->{Items}){ print "Category: $item->{Categories}\n"; print "Company: $item->{CompanyName}\n"; print "Test Field 1: $item->{Test}\n"; print "Test Field 2: $item->{Test2}\n"; print "Test Field 3: $item->{Test3}\n"; print "Test Field 4: $item->{Test4}\n"; print " File As: $item->{FileAs}\n\n"; } print "Done!\n";
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Accessing a user defined field in an Outlook Contact
by traveler (Parson) on Oct 02, 2006 at 22:33 UTC | |
by Anonymous Monk on Oct 03, 2006 at 15:17 UTC | |
by traveler (Parson) on Oct 03, 2006 at 15:23 UTC |