Hi all:
I'm trying to move a bunch of mail items from the inbox to a specific folder. However, if the item is not read, I want to mark it as read before (or after) it is moved.
The move works great, but having problems w/the read.
Thanks,
Ron Repp
If gray hair is a sign of wisdom, then I'm a genius.
My newest novel: Wooden Warriors
I'm trying to move a bunch of mail items from the inbox to a specific folder. However, if the item is not read, I want to mark it as read before (or after) it is moved.
The move works great, but having problems w/the read.
Code:
Sub Move2Facebook()
Dim NSpace As Outlook.NameSpace
Dim MailInbox As Outlook.Folder
Dim DestFolder As Outlook.Folder
Dim MailItems As Outlook.Items
Dim MailItm As Object
Set NSpace = Application.GetNamespace("MAPI")
Set MailInbox = NSpace.GetDefaultFolder(olFolderInbox)
Set MailItems = MailInbox.Items
Set DestFolder = MailInbox.Folders("Facebook")
Set MailItm = MailItems.Find("[from] = 'Facebook'")
While TypeName(MailItm) <> "Nothing"
[b][COLOR=blue]'Here, I want MailItm.Read if not read [/color][/b]
MailItm.Move DestFolder
Set MailItm = MailItems.FindNext
Wend
End Sub
Thanks,
Ron Repp
If gray hair is a sign of wisdom, then I'm a genius.
My newest novel: Wooden Warriors