PDA

View Full Version : Ms Outlook Error -2147221233- [Collaboration Data Objects - [MAPI_E_NOT_FOUND(8004010



jhl84
05-14-2008, 05:57 PM
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

Oorang
05-15-2008, 09:02 AM
See if this solves it:
http://support.microsoft.com/kb/183250

jhl84
05-15-2008, 10:30 PM
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