VB to mark all messages in a folder as UNREAD 
Author Message
 VB to mark all messages in a folder as UNREAD

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.



Tue, 21 Oct 2003 00:49:19 GMT  
 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.


Tue, 21 Oct 2003 09:11:43 GMT  
 VB to mark all messages in a folder as UNREAD

Quote:

> I'm assuming you have Outlook 2000.

You assume right.

Quote:
> Sub MarkAllUnRead()

Worked perfectly.  Thank you!

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



Tue, 21 Oct 2003 12:21:53 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Detecting unread message(s) in folder and highlighting all folders above

2. Detecting unread message(s) in folder and highlighting all folders above

3. Using MAPI Messages to mark as Unread

4. Moving embedded messages to folders / Unread Flag

5. Unread Items in Public Folders like in personal Folders

6. Items not being marked as unread

7. Mark Items as Read or Unread

8. mark as unread

9. Mark as Unread

10. Move and mark msg as unread thru scripting

11. Mark email as unread

12. using VB to look for new, unread messages in outlook

 

 
Powered by phpBB® Forum Software