Yes OutLook is installed, its "Microsoft Office Professional Plus 2013". Please check output of below code it returned outlook object.

#! D:\Straberry\perl\bin\perl -w use strict; use Win32::OLE qw/in/; use Win32::OLE::Const 'Microsoft Outlook'; #use Win32::OLE::Variant; my $OL = Win32::OLE->GetActiveObject('Outlook.Application') || Win32:: +OLE->new('Outlook.Application') or die "$!\n";; my $NameSpace = $OL->GetNameSpace("MAPI"); my $Folder = $NameSpace->GetDefaultFolder("olFolder"); #print ref($Folder->{Items}) . "\n"; #foreach my $subfolder ( in $Folder->Folders) { # printf "%s\n", $subfolder->{Name}; #} print "OLE object's properties:\n"; foreach my $Key (sort keys %$OL) { my $Value; eval {$Value = $OL->{$Key} }; $Value = "***Exception***" if $@; $Value = "<undef>" unless defined $Value; $Value = '['.Win32::OLE->QueryObjectType($Value).']' if UNIVERSAL::isa($Value,'Win32::OLE'); $Value = '('.join(',',@$Value).')' if ref $Value eq 'ARRAY'; printf "%s %s %s\n", $Key, '.' x (40-length($Key)), $Value; }

Output of Above code:

D:\Perl_Project\OutLook>test1.pl
No type library matching "Microsoft Outlook" found at D:\Perl_Project\OutLook\test1.pl line 4.
Win32::OLE(0.1712): GetOleTypeLibObject() Not a Win32::OLE::TypeLib object at D:/Straberry/perl/vendor/lib/Win32/OLE/Const.pm line 49.
Win32::OLE(0.1712) error 0x80020005: "Type mismatch" in METHOD/PROPERTYGET "GetDefaultFolder" argument 1 at D:\Perl_Project\OutLook\test1.pl line 9.
OLE object's properties:
Application ............................. _Application
Assistance .............................. IAssistance
COMAddIns ............................... COMAddIns
Class ................................... 0
DefaultProfileName ...................... Outlook
Explorers ............................... _Explorers
Inspectors .............................. _Inspectors
IsTrusted ............................... 0
LanguageSettings ........................ LanguageSettings
Name .................................... Outlook
Parent .................................. <undef>
PickerDialog ............................ PickerDialog
ProductCode ............................. {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
Reminders ............................... _Reminders
Session ................................. _NameSpace
TimeZones ............................... _TimeZones
Version ................................. 15.0.0.4569
D:\Perl_Project\OutLook>


In reply to Re^4: "Type mismatch" Error While Using Win32:OLE for MS Outlook by dushyant
in thread "Type mismatch" Error While Using Win32:OLE for MS Outlook by dushyant

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.