PC Review


Reply
Thread Tools Rate Thread

How to Delete some item from outlook using ?

 
 
Yanshof
Guest
Posts: n/a
 
      1st Mar 2009
I don't know if this is the right forum to ask this question - but i did nto
find any better forum in code project.


I writing code in C++ and im using com to contol the microsoft outlook.
I try to delete some mail or some appointment with some specific subject or
with some specific body or data from outlook.

But i did not find any good way to do it beside scan all the
mail/appointment in the Outlook:lFolderXXX( XXX is mail folder - like inbox
/ outbox / olFolderCalendar) and compare with the data that i looking for -
and if they are equals then Delete the mail/appointment item.

So i need some "smart" way to find the right item checking each item ..
because scan all the appointment can be a lot of work.

 
Reply With Quote
 
 
 
 
Ken Slovak - [MVP - Outlook]
Guest
Posts: n/a
 
      2nd Mar 2009
That's too broad a question: some subject or body or data.

For Subject or most other data properties in Outlook you can use the Find or
Restrict methods on the Items collection of the folder. See the Outlook VBA
Object Browser Help on Restrict to see what properties you can't use with
Find or Restrict.

For the item Body or HTMLBody you would need to load each item and parse the
Body or HTMLBody property looking for whatever it is you're looking for.

--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm


"Yanshof" <(E-Mail Removed)> wrote in message
news:FE387E29-E1F9-4D3B-8365-(E-Mail Removed)...
>I don't know if this is the right forum to ask this question - but i did
>nto
> find any better forum in code project.
>
>
> I writing code in C++ and im using com to contol the microsoft outlook.
> I try to delete some mail or some appointment with some specific subject
> or
> with some specific body or data from outlook.
>
> But i did not find any good way to do it beside scan all the
> mail/appointment in the Outlook:lFolderXXX( XXX is mail folder - like
> inbox
> / outbox / olFolderCalendar) and compare with the data that i looking
> for -
> and if they are equals then Delete the mail/appointment item.
>
> So i need some "smart" way to find the right item checking each item ..
> because scan all the appointment can be a lot of work.
>


 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto del Outlook delete item snakesboy Microsoft Outlook 5 16th Apr 2007 01:15 PM
Delete outlook item Joe Cattanakey Microsoft Outlook 0 13th Aug 2004 05:13 PM
Outlook won't delete item Renee Microsoft Outlook 1 21st Apr 2004 04:32 AM
Delete item in Outlook Outbox Steve Gross Microsoft Outlook 1 18th Dec 2003 05:14 AM
outlook delete item masaha Microsoft Outlook Discussion 1 14th Oct 2003 07:19 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 07:17 PM.