+ Reply to Thread
Results 1 to 2 of 2

How to Delete some item from outlook by code in c++

  1. #1
    joe41
    Guest

    How to Delete some item from outlook by code in c++

    Hi,

    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 i m 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::olFolderABC
    ( ABC 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.

    Thanks in advance

  2. #2
    Forum Administrator ExlGuru's Avatar
    Join Date
    03-17-2009
    Location
    India
    MS-Off Ver
    2003,2007
    Posts
    222

    Re: How to Delete some item from outlook by code in c++

    Joe we are not able to understand what exactly you want to delete :Some subject or body or data means what?

    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.
    ExlGuru

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1