"E_Abort" error

Discussion in 'Microsoft Outlook Interoperability' started by RDA, Nov 4, 2010.

  1. RDA

    RDA Guest

    When I run the below snippet of code on a Vista Enterprise box using
    Outlook 2007, the following error occurs:

    "An unhandled exception of type
    'System.Runtime.InteropServices.COMException' occurred in MyApp.exe.
    Additional information: Operation aborted {Exception from HRESULT:
    0x80004004 (E_ABORT)}"

    The snippet is below and the line where the error occurs is
    commented.
    I would appreciate any support, tips, or advice. Thanks.


    ////begin code/////

    private void ProcessPosts(MAPIFolder oFldr, MAPIFolder
    oDestFldr)

    {

    int iAttachCnt = 0;

    //cycle through each email, filtering out only posts, no
    personal emails, calendars, or tasks
    string filter = "[MessageClass] = \"IPM.Post\"";
    Microsoft.Office.Interop.Outlook.Items oTestItems =
    oFldr.Items.Restrict(filter);

    for (int i = oTestItems.Count; i > 0; i--)
    {

    Status("Cycling through discussion email...", 10);

    //get post message
    PostItem oMessage = (PostItem)oTestItems;

    //move email
    oMessage.Move(oDestFldr);

    //get attachment count
    iAttachCnt = oMessage.Attachments.Count;

    //declare subject variable
    string strSubject;

    //determine if subject is null and set variable
    accordingly
    if (oMessage.Subject == null)
    {
    strSubject = "";
    }
    else
    {
    strSubject = oMessage.Subject.ToString();
    }

    //create emails GUID for table
    Guid tmpEmID = Guid.NewGuid();


    //ERROR OCCURS HERE at "oMessage"
    string sem = oMessage.SenderEmailAddress.ToString();


    /////end code////
     
    RDA, Nov 4, 2010
    #1
    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. Jon

    Visual C++ Assertion Error

    Jon, Jul 2, 2003, in forum: Microsoft Outlook Interoperability
    Replies:
    0
    Views:
    3,518
  2. Kevin Lam

    MAPI.Fields E_Fail error

    Kevin Lam, Jul 3, 2003, in forum: Microsoft Outlook Interoperability
    Replies:
    0
    Views:
    804
    Kevin Lam
    Jul 3, 2003
  3. J

    Error "Cannot start Microsoft Outlook"

    J, Jul 9, 2003, in forum: Microsoft Outlook Interoperability
    Replies:
    0
    Views:
    1,222
  4. Sue Mosher [MVP]

    Re: GPO Policy causing Outlook Error

    Sue Mosher [MVP], Jul 9, 2003, in forum: Microsoft Outlook Interoperability
    Replies:
    1
    Views:
    865
    Mike MacDonald
    Jul 9, 2003
  5. Re: Socket Error: 10060. Error Number: 0x800CCC0E

    , Apr 29, 2014, in forum: Microsoft Outlook Interoperability
    Replies:
    0
    Views:
    1,353
Loading...

Share This Page