1
votes

I created an Outlook 2013 AddIn which should read the "location" field of an E-Mail. I achieved it to get the selected MailItem and to read the subject from it but is there a way to read the "location" field of an Meeting E-Mail?

I hope anybody is able to help me

1

1 Answers

0
votes

Assign the MailItem object to an AppointmentItem object to access the Location property:

    using Outlook = Microsoft.Office.Interop.Outlook;

    ....

    Outlook.AppointmentItem app;
    Outlook.MailItem mi;
    String loc;

    .....

    app = (Outlook.AppointmentItem)mi;
    loc = app.Location;

    //  or
    loc = ((Outlook.AppointmentItem)mi).Location;