Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT)) in outlook.Items.Add()

1

I am getting error as Operation aborted (Exception from HRESULT: 0x80004004 (E_ABORT)) in outlook. I have debugged the code and found exception in Outlook.Items.Add() method. The code is like this,

Outlook.NameSpace nSpace = null;
Outlook.MAPIFolder InBoxFolder = null;

Outlook._Application OutlookApp = new Outlook.Application();
nSpace = OutlookApp.GetNamespace("MAPI");
InBoxFolder = nSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox);
Outlook.Items FolderItems = InBoxFolder.Folders.GetFirst().Items;
Outlook.MailItem mail = (Outlook.MailItem)FolderItems.Add(Outlook.OlItemType.olMailItem);

Please help me with this. Thanks in advance.

c#
outlook
outlook-addin
asked on Stack Overflow Sep 30, 2014 by Kewal

0 Answers

Nobody has answered this question yet.


User contributions licensed under CC BY-SA 3.0