Results 1 to 2 of 2
  1. #1
    Star Lounger
    Join Date
    Feb 2001
    Location
    Auckland, North Island, New Zealand
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Marking old items as

    I have a folder that receives 100's of news items (mail) a day and I would like to be able to select all the mail older than today and then mark them as read. How can I do this using VBA?

  2. #2
    Platinum Lounger
    Join Date
    Jan 2001
    Location
    Roanoke area, Virginia, USA
    Posts
    3,729
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Marking old items as

    you'll need to look at the received date and if it's older than "today()-1", move to a new folder.

    i don't have any sample code for it, but if you have a macro started and run into problems, post the code and we can hlp you figure it out.

    if you're new to outlook programming, you'll need to dim these:
    Dim olApp As New Outlook.Application
    Dim olNS As Outlook.NameSpace
    Dim olFolder As Object
    Dim olMsg As Object
    Set these:
    Set olNS = olApp.GetNamespace("MAPI")
    Set olFolder = olNS.GetDefaultFolder(olFolderInbox)
    and look at the received time: olMsg.ReceivedTime

Posting Permissions

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