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?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Jochen Stuempfig

    Outlook 2000 InvalidCast Exception

    Jochen Stuempfig, Aug 19, 2003, in forum: Microsoft Outlook Program Addins
    Replies:
    0
    Views:
    494
    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:
    477
    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:
    541
  4. SeekerOfTruths

    OpenSharedItem and .MSG files

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

    OpenSharedItem holds onto FileHandle

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

Share This Page