Perl WIN32 OLE - Outlook save text
| Problem | Solution | Example | Reference | Recommended | |
|
|||||
| Problem | Solution | Example | Reference | Recommended | |
|
|||||
| Problem | Solution | Example | Reference | Recommended |
|
Here is the code - if you have any dramas with it, leave a comment. #!perl
use Win32::OLE qw(in with); # Connect to a running version of Outlook die "Outlook not installed" if $@; # If that fails start up Outlook # This appears to return a ref to the object # Workaround to be able to extract key/value pairs # This is the number of items in designated folder # Drop out if there are no mail items in this folder print LOGFH "Count: $count for $name\n"; $filename='yourname'; for($i=1;$i<=$count;$i++) { $oItems=$thisFolder->Items(1); %thisItem=%{$oItems}; if($subject =~ /pattern: upload/) { $oItems->Move($toFolder); } else { print LOGFH "No Files to Process\n"; } close(LOGFH); |
||||
