A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Add-ins for Outlook
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Deleting mails in the Exchange using MAPI



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old February 12th 09, 09:09 AM posted to microsoft.public.outlook.program_addins
Daman via OfficeKB.com
external usenet poster
 
Posts: 1
Default 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

Ads
  #2  
Old February 12th 09, 04:44 PM posted to microsoft.public.outlook.program_addins
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default 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



  #3  
Old February 13th 09, 12:09 PM posted to microsoft.public.outlook.program_addins
DamanPradhan via OfficeKB.com
external usenet poster
 
Posts: 4
Default 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

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Send email with MAPI doesn't save mails in sent items Giorgio Vanoni Add-ins for Outlook 3 June 5th 08 05:55 PM
Outlook Express is Deleting e-mails zeke Outlook Express 18 November 23rd 07 08:47 AM
Mapi-Restriction does not work on Exchange Peter Marchert Outlook and VBA 18 October 7th 07 10:15 AM
Question about deleting mails with attachments Bangali Outlook - General Queries 3 May 1st 07 12:14 AM
Deleting e-mails on mailserver from Outlook2000 using POP3 Oktokie Outlook - General Queries 1 July 11th 06 08:11 PM


All times are GMT +1. The time now is 09:09 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-2025 Outlook Banter.
The comments are property of their posters.