View Single Post
  #7  
Old January 11th 08, 10:51 PM posted to microsoft.public.outlook
JP[_3_]
external usenet poster
 
Posts: 201
Default Archive only 'Read e-mails'

Sorry that should be

Private WithEvents Items As Outlook.Items
Private Sub Application_Startup()
Dim objNS As Outlook.NameSpace
Set objNS = Application.GetNamespace("MAPI")
Set Items = objNS.GetDefaultFolder(olFolderInbox).Items
End Sub
Private Sub Items_ItemChange(ByVal Item As Object)
If (Item.Class = olMail) And (Item.UnRead = False) Then
On Error Resume Next
' Msgbox "Setting do not archive flag now"
Item.NoAging = True
On Error Goto 0
End if
End Sub


On Jan 11, 4:41*pm, JP wrote:
You may want to post your question in microsoft.*public.*outlook.*
program_vba.


Ads