
VB to mark all messages in a folder as UNREAD
I'm assuming you have Outlook 2000.
Sub MarkAllUnRead()
Dim objMail As Object
Dim colItems As Outlook.Items
Dim objFold As Outlook.MAPIFolder
Set objFold = Application.GetNamespace("MAPI").PickFolder
If objFold Is Nothing Then
Exit Sub
End If
Set colItems = objFold.Items
For Each objMail In colItems
objMail.UnRead = True
objMail.Save
Next objMail
Set objMail = Nothing
End Sub
--
/Neo - Sometimes it pays to be a blonde
Are you considering installing the Email Security Patch or Office 2000
Service Pack 2?
Read this page first and consider your choice carefully if you depend on
accessing specific attachments or have programs that need access to
Outlook's address book.
http://www.slipstick.com/outlook/esecup.htm
Quote:
> I am looking for the Visual Basic that I can toss into a Sub that will
mark
> all the messages in a folder as unread.
> Can someone help?
> Thanks!
> (note that auto-reply to this post will FAIL - use emailID below)
> --Jeff Abramson, Engineering Manager jabram "at"
ichips.intel.com
> Pentium(tm) 4 (Wilamette/Northwood) Design Team
> Pentium(tm) Pro (P6) Design Team Intel Corporation, Hillsboro
Oregon
> Claim to fame: The first person to ever play DOOM (FAST!) on an Intel
P6.