Its not really a monitor function. It is more code that you can run once it is decided that you do want to process something in your mailbox.
By the way, if you know that the user has selected the item in Outlook that you want to process, it can be MUCH simpler to do something like:
VB Code:
Dim myOlSel As Outlook.Selection Dim olExp, olCurrentFolder Dim x As Integer Set olExp = Outlook.ActiveExplorer Set olCurrentFolder = olExp.CurrentFolder MsgBox “Folder “ & olCurrentFolder & _ “ has “ & olCurrentFolder.Items & “ items in it” Set myOlSel = olExp.Selection ‘ Get the subject ‘ modify the subject in the message, and save the changes For x = 1 To myOlSel.Count thisSubject = CheckSubject(myOlSel.Item(x).Subject) MyOLSel.Item(x).Subject = “FILED – “ & thisSubject MyOLSel.Item(x).Save Next x
Or you should be able to go straight to the Inbox with something like:
VB Code:
Dim oOutlook As New Outlook.Application Dim oNameSpace As NameSpace Dim myItems As Items Set oNameSpace = oOutlook.GetNamespace("MAPI") Set myItems = oNameSpace.GetDefaultFolder (olFolderInbox).Items Call LookThroughFolder(myItems)




