Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Add-ins for Outlook (http://www.outlookbanter.com/add-ins-outlook/)
-   -   Deleting mails in the Exchange using MAPI (http://www.outlookbanter.com/add-ins-outlook/86171-deleting-mails-exchange-using-mapi.html)

Daman via OfficeKB.com February 12th 09 09:09 AM

Deleting mails in the Exchange using MAPI
 
Hi,

I am trying to delete mails from the Exchange using the following code :
(using MAPI33.dll and C#)

result = inbox.DeleteMessages(messages, IntPtr.Zero, null, MAPIFolder.FLAGS.
Default);
//messages if of type MAPI33.ENTRYID[]

result gives me back a NoAccess (2147942405) value.

Can anyone tell me what am I doing wrong here ?

Thanks in advance !!!
Daman

--
- Daman

Message posted via http://www.officekb.com


Dmitry Streblechenko February 12th 09 04:44 PM

Deleting mails in the Exchange using MAPI
 
Did you open the folder and its parent store in the read/write mode?

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
"Daman via OfficeKB.com" u49522@uwe wrote in message
news:9196bc4258743@uwe...
Hi,

I am trying to delete mails from the Exchange using the following code :
(using MAPI33.dll and C#)

result = inbox.DeleteMessages(messages, IntPtr.Zero, null,
MAPIFolder.FLAGS.
Default);
//messages if of type MAPI33.ENTRYID[]

result gives me back a NoAccess (2147942405) value.

Can anyone tell me what am I doing wrong here ?

Thanks in advance !!!
Daman

--
- Daman

Message posted via http://www.officekb.com




DamanPradhan via OfficeKB.com February 13th 09 12:09 PM

Deleting mails in the Exchange using MAPI
 
Thanks Dmitry,

I did miss out on the Write flag.

Thanks again !!!

Dmitry Streblechenko wrote:
Did you open the folder and its parent store in the read/write mode?

Hi,

[quoted text clipped - 12 lines]
Thanks in advance !!!
Daman


--
- Daman

Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...ddins/200902/1



All times are GMT +1. The time now is 12:44 AM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com