OpenSharedItem - Exception

Discussion in 'Microsoft Outlook Program Addins' started by Andre Maas, Oct 10, 2007.

  1. Andre Maas

    Andre Maas Guest

    Hello,

    i would like to load a Mail from filesystem. In OL2007 is a new function
    called: 'OpenSharedItem'.

    I've called the function like:

    MailItem mailItemLoaded =
    Application.Session.OpenSharedItem(@"D:\456.msg") as MailItem;

    If the mail is an OL2007 Mail the function works fine. If the mail i
    would like to load is from OL2000 oder OL2003 the function throw the
    following exception: 'System.Runtime.InteropServices.COMException'.

    Have anyone else have faced any similar problem? What I am doing wrong
    here? Any pointers on this will be of great help.


    Regards,

    André
     
    Andre Maas, Oct 10, 2007
    #1
    1. Advertisements

  2. Andre Maas

    Andre Maas Guest

    Andre Maas schrieb:
    > Hello,
    >
    > i would like to load a Mail from filesystem. In OL2007 is a new function
    > called: 'OpenSharedItem'.
    >
    > I've called the function like:
    >
    > MailItem mailItemLoaded =
    > Application.Session.OpenSharedItem(@"D:\456.msg") as MailItem;
    >
    > If the mail is an OL2007 or OL 2003 Mail the function works fine. If the mail i
    > would like to load is from OL2000 the function throw the
    > following exception: 'System.Runtime.InteropServices.COMException'.
    >
    > Have anyone else have faced any similar problem? What I am doing wrong
    > here? Any pointers on this will be of great help.
    >
    >
    > Regards,
    >
    > André
     
    Andre Maas, Oct 10, 2007
    #2
    1. Advertisements

  3. Andre Maas

    Andre Maas Guest

    Hello,

    i would like to load a Mail from filesystem. In OL2007 is a new function
    called: 'OpenSharedItem'.

    I've called the function like:

    MailItem mailItemLoaded =
    Application.Session.OpenSharedItem(@"D:\456.msg") as MailItem;

    If the mail is an OL2007 or OL2003 Mail the function works fine. If the
    mail i
    would like to load is from OL2000 the function throw the
    following exception: 'System.Runtime.InteropServices.COMException'.

    Have anyone else have faced any similar problem? What I am doing wrong
    here? Any pointers on this will be of great help.


    Regards,

    André
     
    Andre Maas, Oct 10, 2007
    #3
    1. Advertisements

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.
Similar Threads
  1. Jochen Stuempfig

    Outlook 2000 InvalidCast Exception

    Jochen Stuempfig, Aug 19, 2003, in forum: Microsoft Outlook Program Addins
    Replies:
    0
    Views:
    619
    Jochen Stuempfig
    Aug 19, 2003
  2. Kiran Kumar

    Item.Save throwing Exception

    Kiran Kumar, Oct 16, 2003, in forum: Microsoft Outlook Program Addins
    Replies:
    0
    Views:
    612
    Kiran Kumar
    Oct 16, 2003
  3. Mani

    outlook add-in throwing exception

    Mani, Oct 30, 2003, in forum: Microsoft Outlook Program Addins
    Replies:
    0
    Views:
    677
  4. Eric

    Not found error getting Exception.AppointmentItem

    Eric, Jan 29, 2004, in forum: Microsoft Outlook Program Addins
    Replies:
    2
    Views:
    585
  5. Greg Vasilyev

    ActiveExplorer.Selection exception / working with currently selecded items

    Greg Vasilyev, Mar 2, 2004, in forum: Microsoft Outlook Program Addins
    Replies:
    7
    Views:
    589
    Dmitry Streblechenko \(MVP\)
    Mar 3, 2004
  6. Scott T
    Replies:
    3
    Views:
    547
    Ken Slovak - [MVP - Outlook]
    Mar 15, 2004
  7. SeekerOfTruths

    OpenSharedItem and .MSG files

    SeekerOfTruths, Dec 17, 2008, in forum: Microsoft Outlook Program Addins
    Replies:
    3
    Views:
    2,108
    Ken Slovak - [MVP - Outlook]
    Dec 18, 2008
  8. DamonR

    OpenSharedItem holds onto FileHandle

    DamonR, Aug 8, 2011, in forum: Microsoft Outlook Program Addins
    Replies:
    0
    Views:
    2,079
    DamonR
    Aug 8, 2011
Loading...