Error adding an Outlook Contact

Ok, I found my answer via IRC. It turns out that there are constants for
Gender. 1 is for female and 2 is for male.

-Dwayne

···

-----Original Message-----
From: Dwayne Smurdon @ DNA Media Pro [mailto:smurdon@dnamediapro.com]
Sent: Wednesday, February 05, 2003 11:33 PM
To: ruby-talk ML
Subject: error adding an Outlook Contact…

Ok, I’m adding in new Contacts in Outlook from a MS SQL Server database.
It fails on Gender. If I add the gender field to ‘user1’ or something else,
it’s just fine. At first I thought it was because my datasource has an "M"
instead of “Male” – so catch that and change it. Below is the debug output
from my script.

Any thoughts?

-Dwayne

This is where I am (PREIT-RUBIN Inc.) CompanyName
This is where I am (R.) MiddleName
This is where I am (Dudley) FirstName
This is where I am (Male) GENDER
./OutlookContact.rb:18:in `method_missing’: (WIN32OLERuntimeError)
OLE error code:4096 in Microsoft Outlook
Type Mismatch: Unable to coerce parameter value. Outlook cannot
translate your string.
HRESULT error code:0x80020009