Consulting

Results 1 to 3 of 3

Thread: Ms Outlook Error -2147221233- [Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010

  1. #1

    Ms Outlook Error -2147221233- [Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010

    I'm running a macro in Ms Outlook to extract attachments from emails and save it in a folder. The sender email address and subject forms the saved attachments' filename.

    The macro works fine but recently when I ran it, it gives me this error:
    -2147221233- [Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010F)]]
    I have no idea what I did wrong. Not sure if the settings in Outlook I accidentally modified. I did not modify the macro all this while so I'm baffled.

    I remember applying a security patch on my pc and I have not the slightest idea what it was. What could have possibly changed in my environment that triggered this error?

    Or perhaps is there anything I can do to modify the code below to make it working again?

    Private Function GetExchangeSenderAddress(objMsg As MailItem) As String
      
        Dim oSession As Object
        Set oSession = CreateObject("MAPI.Session")
        oSession.Logon "", "", False, False
        
        Dim sEntryID As String
        Dim sStoreID As String
        Dim oCdoMsg As Object
        Dim sAddress As String
        Const g_PR_SMTP_ADDRESS_A = &H39FE001F
        
        sEntryID = objMsg.EntryID
        sStoreID = objMsg.Parent.StoreID
        Set oCdoMsg = oSession.GetMessage(sEntryID, sStoreID)
        
        sAddress = oCdoMsg.Sender.Fields(g_PR_SMTP_ADDRESS_A).Value
        Set oCdoMsg = Nothing
        oSession.Logoff
        Set oSession = Nothing
        
        GetExchangeSenderAddress = sAddress
        
    End Function
    Please advice, thanks

  2. #2
    Knowledge Base Approver VBAX Master Oorang's Avatar
    Joined
    Jan 2007
    Posts
    1,135
    Location
    Cordially,
    Aaron



    Keep Our Board Clean!
    • Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
    • Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.

  3. #3
    the solution it suggested is:
    3.Use CDO (1.1, 1.2, 1.21) to create a new test appointment so that Free/Busy information is created for that mailbox.
    i don't understand this part. how do i use CDo to create a test appointment?

    thanks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •