P
Paul Schrader
Hello,
I use the code below to monitor my inbox to move messages to particular
folders. The code works fine. What I need help with is the following
In outlook 2002 I have 2 inbox open at the same time , the primary is my
personal account ( Named Paul) and the secondary is an account( Named
Testing) that receive thousands of email a day. When I open outlook I need
to be able to have both accounts open so I can move back and forth between
the accts without having to log out and start a new outlook session and
select the acct to open. What I need help with is modifying the code below
to work on the Secondary acct(Named Testing) as the code currently only
appears to work on the Primary acct.
Any help would be appreciated
Thanks
Paul
Sub StartRule()
Dim objNameSpace As Outlook.NameSpace
Dim objInboxFolder As Outlook.MAPIFolder
Set objNameSpace = Application.Session
Set objInboxFolder = objNameSpace.GetDefaultFolder(olFolderInbox)
Set objInboxItems = objInboxFolder.Items
'Set objDestinationFolder = objInboxFolder.Folders("Ndm Notifications")
End Sub
' Run this code to stop your rule.
Sub StopRule()
Set objInboxItems = Nothing
End Sub
' This code is the actual rule.
Private Sub objInboxItems_ItemAdd(ByVal Item As Object)
reg_Email
If Item.Subject = "Upload Confirmation" Then
Item.UnRead = False
Item.Move objDestinationFolder
End If
End Sub
I use the code below to monitor my inbox to move messages to particular
folders. The code works fine. What I need help with is the following
In outlook 2002 I have 2 inbox open at the same time , the primary is my
personal account ( Named Paul) and the secondary is an account( Named
Testing) that receive thousands of email a day. When I open outlook I need
to be able to have both accounts open so I can move back and forth between
the accts without having to log out and start a new outlook session and
select the acct to open. What I need help with is modifying the code below
to work on the Secondary acct(Named Testing) as the code currently only
appears to work on the Primary acct.
Any help would be appreciated
Thanks
Paul
Sub StartRule()
Dim objNameSpace As Outlook.NameSpace
Dim objInboxFolder As Outlook.MAPIFolder
Set objNameSpace = Application.Session
Set objInboxFolder = objNameSpace.GetDefaultFolder(olFolderInbox)
Set objInboxItems = objInboxFolder.Items
'Set objDestinationFolder = objInboxFolder.Folders("Ndm Notifications")
End Sub
' Run this code to stop your rule.
Sub StopRule()
Set objInboxItems = Nothing
End Sub
' This code is the actual rule.
Private Sub objInboxItems_ItemAdd(ByVal Item As Object)
reg_Email
If Item.Subject = "Upload Confirmation" Then
Item.UnRead = False
Item.Move objDestinationFolder
End If
End Sub