
May 20th, 2005, 07:55 AM
|
|
Registered User
|
|
Join Date: May 2005
Posts: 14
Time spent in forums: 4 h 41 m 5 sec
Reputation Power: 0
|
|
|
outlook issue
Hi guys
I'm writing an app that does a recursive search from a top level folder looking for unread emails. I then pull out the info from the msg.Body and put this in a db.
However I've yet to find a way of alterting the state of the msg from unread to read.
Any ideas what to do??
Heres some code:
Code:
Dim numfolders As Integer
numfolders = mDownloadFolder.Folders.Count
Dim currentFolderNum As Integer
For currentFolderNum = 1 To numfolders
Set mCurrentFolder = mDownloadFolder.Folders.Item(currentFolderNum)
Dim numMails As Integer
numMails = mCurrentFolder.Items.Count
'For Each msg In mCurrentFolder.Items
'count backward through mails as most recent is last in...
Dim j As Integer
For j = numMails To 1 Step -1
Set msg = mCurrentFolder.Items(j)
If msg.UnRead Then
getMailDetails (j)
Else
'if we have read an item then its already been dealt with
'go to next folder
MsgBox "no unread mail in " & mCurrentFolder
Exit For
End If
Next j
Next currentFolderNum
|