mortbarsky has asked for the wisdom of the Perl Monks concerning the following question:

Howdy Monks,

I have a slight problem starting outlook 11 with

Win32::OLE->new('Outlook.Application')
The issue I have is the script runs on a system with outlook 10 (albeit with the security pop-up), but not on the system with outlook 11. Anyone with any idea as to what's up? Code below......

Thanks,

Mort

#!/usr/bin/perl -w use Win32::OLE; use Win32::OLE::Const 'Microsoft Outlook'; my $outlook = Win32::OLE->new('Outlook.Application'); my $MailItem = $outlook->CreateItem(olMailItem); my $objOutlookRecip = $MailItem->Recipients; $objOutlookRecip->Add("Rich"); my $recip = $objOutlookRecip->Add("Rich"); $recip->{Type} = olCC; $objOutlookRecip->ResolveAll(); $MailItem->{Subject} = "$Info{Customer} / Part No: " . $Info{'Part Num +ber'} . ", Rev. $Info{Rev} / Catalog Number $ENV{JOB}"; $MailItem->{Body} = " !!!Traveler change request!!!\n\n" . "$Info{Customer} " . $Info{'Part Number'} . " Rev $Info{Rev} \n\n" . "\n"; $MailItem->Display();

Replies are listed 'Best First'.
Re: Win32::OLE->new('Outlook.Application') Prob
by NetWallah (Canon) on May 31, 2008 at 05:28 UTC
    Please use <code> tags, as described in Writeup Formatting Tips.

    Please also describe what error or message you get when running this on a system with outlook 11. In addition, diagnostic information may be available in the Application event log.

         "A fanatic is one who redoubles his effort when he has forgotten his aim."—George Santayana

      my $outlook = Win32::OLE->new('Outlook.Application') or die "LOOK AN ERROR : ", Win32::OLE->LastError();