freebsdboy has asked for the wisdom of the Perl Monks concerning the following question:
I see that you can get the message subject by using item->Subject etc.. but its not clear what use when I'm looking for a Public Folders Owner ACL list and sub folder hierarchy Thanks#!/bin/perl use Win32::OLE; use Win32::OLE::Const 'Microsoft Outlook'; # or 'Microsoft Outlook 9.0 Object Library'; # Const module defines many usefule constants - like olFolderContacts +, etc. my $Outlook = Win32::OLE->GetActiveObject('Outlook.Application') or di +e "oops 1"; my $namespace = $Outlook->GetNamespace("MAPI"); my $folder = $namespace->GetDefaultFolder(olPublicFoldersAllPublicFold +ers); my $items = $folder->Items; print STDERR "Folder: ", $folder->Name,"\n"; print STDERR "Total entries: ",$items->Count,"\n"; print_folders($folder); sub print_folders { my $folder = shift; my $subfolderlevel=0; print "Folder: " . $folder->Name , $subfolderlevel,"\n"; foreach my $fld (in $folder->(UserProperties)) { print "Field Name", $fld->{Name},"\n"; print "Field Value", $fld->Value, "\n"; } if ($folder->Folders->Count) { $subfolderlevel++; foreach my $i (1..$folder->Folders->Count) { print_folders($folder->Folders($i)); } } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Pulling UserProperties out of Outlook
by tachyon-II (Chaplain) on Dec 01, 2007 at 06:07 UTC | |
by freebsdboy (Novice) on Dec 03, 2007 at 21:22 UTC |