ERROR : System.Runtime.InteropServices.COMException (0x80004004):

K

Koen Vosters

Hi,

I wrote an outlook addin that allows users to save their emails to a certain
SharePoint location. First idea was to save them on a share, have them then
picked up by a service that pushes them into SharePoint. That all worked, but
some people got errors. Thinking that the problem lies with the service and
the save blocking eachother from time to time, we changed the solution where
it is saved locally and then copied to the share. For some reason the error
still remains:

ERROR : System.Runtime.InteropServices.COMException (0x80004004): Operation
aborted (Exception from HRESULT: 0x80004004 (E_ABORT))
at Microsoft.Office.Interop.Outlook._MailItem.SaveAs(String Path, Object
Type)

Any clues to why this is happening?
 
K

Ken Slovak - [MVP - Outlook]

Hard to tell just from that. Is the Path valid and are you using a Type
that's valid and appropriate for that type of item? Does the user have
permissions to save to that path?

Is this service still being used? Does it use the Outlook object model? Use
of the Outlook object model in a Windows service is not supported and can
lead to all sorts of errors.

What version of Outlook is this for? If it's for Outlook 2007 why not use
the new features specifically designed for SharePoint?
 
K

Koen Vosters

The path is valid. It's also no longer the service that is causing the
problem. The strange thing of it all is that it works in 95% of the cases,
but on 5% of the emails the users get this error.

I'm saving them as an msg file. The user does have permission, as it works
in 95% of the cases.

Basically how it works is : I save the file locally with MailItem.SaveAs,
then I copy it to the shared folder. On that folder a service picks it up and
depending on the extension it copies it into a SharePoint library.

I do not use the outlook object model in the service, I just pick up files
and use the SharePoint object model to put them into SharePoint.

The Outlook Version is 2003.
 
K

Ken Slovak - [MVP - Outlook]

Well, from the information received there's no way to know why it's failing.
If it works sometimes and not others with the same user then more error
handling and logging would be called for to see what's going on. If the
problem is for some users and not others then it's a matter of seeing what's
different in the setups of those users.

I'd also check message formats and see if those correlate with the problems.
 
D

Dmitry Streblechenko

Are you sure the path does not contain any invalid characters, such as :, ;,
*, etc? You can easily end up with ":" if you use the value of the Subject
property.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
K

Koen Vosters

Yes, I am 100% sure of that. First of all, the path is composed from a number
that comes from a database, added with "_request.msg" at the end. So it will
be something like 10548_request.msg

Secondly, saving the same email a bit later does work.
 
D

Dmitry Streblechenko

Where does the message come from? How many messages do you process before
you see thsi error?

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
B

Bo.jangles

You are not alone. I have application that was running for over the year and
this started happening last week.

The problem is intermittent.
 
V

vivekemails

You are not alone. I have application that was running for over the year and
this started happening last week.

The problem is intermittent.







- Show quoted text -

have you checked your domain policies? it can also cause the problem.
 

Ask a Question

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. After that, you can post your question and our members will help you out.

Ask a Question

Top