【发布时间】:2014-02-21 15:00:32
【问题描述】:
我被分配使用 perl 从 ms Outlook 下载附件,邮件主题为 Net file。由于我是 perl 的新手,我很困惑如何进行。这是我必须继续使用的代码
use strict;
use warnings;
use Win32::OLE;
use Win32::OLE::Const 'Microsoft Outlook';
my $outlook;
eval {$outlook = Win32::OLE->GetActiveObject('Outlook.Application')};
die "Outlook not installed" if $@;
unless (defined $outlook) {
$outlook = Win32::OLE->new('Outlook.Application','Quit')
or die "Unable to start Outlook";
}
$outlook->{visible} = 0;
my $dir = "F:\\OL\\"; #destination directory
$dir =~ s/\//\\/g;
#get the Inbox folder
my $namespace = $outlook->GetNamespace("MAPI");
谁能帮我解决剩下的部分代码。
【问题讨论】: