in reply to Can not connect existing Outlook
I actually prefer something like this:
use strict; use warnings; use Win32::OLE; my $oa; eval {$oa = Win32::OLE->GetActiveObject('Outlook.Application')}; die "Outlook not installed" if $@; unless (defined $oa) { print "Outlook is not running. Attempting to start it.\n"; $oa = Win32::OLE->new('Outlook.Application', sub {$_[0]->Quit;}) or die "Oops, cannot start Outlook"; } # do something with $oa here
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Can not connect existing Outlook
by banduwgs (Beadle) on Aug 05, 2003 at 15:14 UTC | |
by Mr. Muskrat (Canon) on Aug 05, 2003 at 15:19 UTC | |
by Foggy Bottoms (Monk) on Aug 06, 2003 at 08:00 UTC |