Error when using Microsoft.Office.Interop.Outlook.MailItem.Send() with Office 2013

We have a VB .NET application that uses the method Microsoft.Office.Interop.Outlook.MailItem.Send() to send emails using Outlook 2007.  

Upon upgrading some of our workstations to Office 2013 64-bit, the same application now throws the error “Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT))” when sending emails from Outlook 2013.  

We are aware that we could use SMTP email as a workaround, but we don’t want to use that method.  Is there a solution for this error when using MailItem.Send() with Outlook 2013?
KramarichAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

David Johnson, CD, MVPOwnerCommented:
use the 32 bit version of outlook and not the 64 bit version
0
KramarichAuthor Commented:
That’s not an option for us. Our certified version is the 64-bit version.
0
Ron MalmsteadInformation Services ManagerCommented:
Did you try using the office 2013 64 bit Interop DLL in the project references?

http://msdn.microsoft.com/en-us/library/vstudio/15s06t57(v=vs.120).aspx

Microsoft Outlook 15.0 Object Library
Microsoft.Office.Interop.Outlook.dll
0
Newly released Acronis True Image 2019

In announcing the release of the 15th Anniversary Edition of Acronis True Image 2019, the company revealed that its artificial intelligence-based anti-ransomware technology – stopped more than 200,000 ransomware attacks on 150,000 customers last year.

KramarichAuthor Commented:
Yes. We referenced Microsoft.Office.Interop.Outlook - 15.0 version in project references.
0
Ron MalmsteadInformation Services ManagerCommented:
..hmmm.. very interesting.
Is the error thrown exactly on MailItem.Send()?

I wonder if you can use a 32-bit dll though.. since a 64 bit machine can still run it.
The first suggestion by ve3ofa, may be your solution.

What is your "Target CPU:" set to in your advanced compile properties in the project?
Also, are you catching this error in a "Try" statement?.. or is it unhandled?
0
KramarichAuthor Commented:
Yes. We are getting the error while executing the line MailItem.Send().  I am catching it inside a "Try" block.  The Target CPU is set as "x64". We also tried AnyCPU and x86.
0
KramarichAuthor Commented:
We believe this problem was caused by Group Policy and McAfee.  It has since been resolved but I have no idea what they changed that finally eliminated the problem.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
KramarichAuthor Commented:
I would have giving a grade of F if I could have.  I wish I could tell you what finally fixed the problem but I can't.
0
Sep FraunhofferCommented:
There is another library you need to use to get it to work. Download the sample file at https://code.msdn.microsoft.com/windowsdesktop/VB-NET-OUTLOOK-SEND-EMAIL-4956ed06 and adapt your code. Notice _Application, _MailItem, and using .To instead of .Recipients.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Visual Basic.NET

From novice to tech pro — start learning today.