I can tell you right off the top that a bunch of your property names are incorrect. Here is what the property names should be (I've only included the ones to which you were actually giving data):
$NewContact->{FullName}= $rec->{first_name} . ' ' . $rec->{last_name}; $NewContact->{Title} = $rec->{title}; $NewContact->{FirstName} = $rec->{first_name}; $NewContact->{LastName} = $rec->{last_name}; $NewContact->{BusinessTelephoneNumber} = join '-', $rec->{prefix1}, $rec->{suffix1}; if ($rec->{prefix2}){ $NewContact->{Business2TelephoneNumber} = join '-', $rec->{prefix2}, $rec->{suffix2}; } else { $NewContact->{Business2TelephoneNumber} = '27'; } $NewContact->{CompanyName} = $rec->{company}; $NewContact->{PrimaryTelephoneNumber} = join '-', $rec->{prefix1}, $rec->{suffix1}; $NewContact->{OfficeLocation} = $rec->{location}; $NewContact->{User1} = $rec->{site}; $NewContact->{"Email1Address"} = 'mytest@mytest.com';
See if that helps. Use that browser that I pointed out to actually investigate the 'ContactItem' class object, and use the exact name given for the other properties in question.

C-.

Update: To answer your other questions. You should read the Win32::OLE documentation first. The GetActiveObject method is described there, as it's a part of that package.


In reply to Re: Check your property Names in the Outlook ContactItem Class by cacharbe
in thread Perl control of Outlook import to contacts with win32::OLE by Anonymous Monk

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.