in reply to Filter(?) for Win32 OLE Find method
#! /usr/bin/perl use strict; use warnings; use Win32::OLE qw( in ); #Outlook Application creation my $outlook = Win32::OLE->CreateObject('Outlook.Application'); my $ns = $outlook->getNamespace('MAPI'); my $inbox = $ns->GetDefaultFolder(6); #String to match my $match_str = 'test'; #Search the items foreach my $item (in $inbox->Items){ if($item->{Subject} =~ /^$match_str/i){ print "$item->{Subject} matches\n"; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Filter(?) for Win32 OLE Find method
by banduwgs (Beadle) on Aug 06, 2003 at 17:13 UTC |