C# and msoffice integration problem

Discussion in 'OT Technology' started by Dimka.m, Mar 11, 2004.

  1. Dimka.m

    Dimka.m Czar

    Joined:
    Jun 10, 2001
    Messages:
    3,140
    Likes Received:
    0
    Location:
    Siberia
    I am writing an Outlook Add-In in C# that will (upon click of a button) take the selected message in the folder and save it to a database.

    My problem is that I HAVE to have the sender email address. It would be even better if I could get the Reply-To address.

    Unfortunately the Outlook.MailItem object does not expose those
    properties and the SenderName property is no help at all.

    I'm stumped. [​IMG]

    I have spent hours on this problem and I find it quite ridiculous. [​IMG]
     
  2. SLED

    SLED build an idiot proof device and someone else will

    Joined:
    Sep 20, 2001
    Messages:
    28,118
    Likes Received:
    0
    Location:
    AZ, like a bauce!
    can you get the original mail header??

    if so, you can just parse it out of there
     
  3. Dimka.m

    Dimka.m Czar

    Joined:
    Jun 10, 2001
    Messages:
    3,140
    Likes Received:
    0
    Location:
    Siberia
    I wish I could, but Outlook.MailItem object does not expose it either... lol it's kinda sad really.

    I have that problem figured out though, I downloaded Redemption object that uses MAPI to get those properties. I guess I could've also written my code using MAPI but why reinvent the wheel... :dunno:

    For the record, this is one of the dumbest things I have seen yet from MSFT. :(
     
  4. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    Hey, you know you can extract data from the pst file directly from access eh?
     
  5. Dimka.m

    Dimka.m Czar

    Joined:
    Jun 10, 2001
    Messages:
    3,140
    Likes Received:
    0
    Location:
    Siberia
    so you're saying that I could use an ODBC connection to the pst from the add-in?
     
  6. 5Gen_Prelude

    5Gen_Prelude There might not be an "I" in the word "Team", but

    Joined:
    Mar 14, 2000
    Messages:
    14,519
    Likes Received:
    1
    Location:
    Vancouver, BC, CANADA
    Well, no, not really - the point is to get the information into a database right? Why not do it from the database end instead of mail client end?
     

Share This Page