When you say that "If the mails empty..." do you mean that the
Outlook email body is empty or the folder is empty?
I found part of the problem with the function - OpenOutlookEmail.
The passed variable declaration is spelled wrong (my dyslexia!).
Give me a minute and I will figure it out.VB Code:
Private Function OpenOutlookEmail(ByVal [color=red]oEmailEntryID[/color] As String) Dim oDisplayEmail As Outlook.MailItem Set oDisplayEmail = oInbox.Items.Find("[EntryID] = '" & oEmailEntryID & "'") If TypeName(oDisplayEmail) <> "Nothing" Then oDisplayEmail.Display 'THE USE CAN MAKE CHANGES AND SAVE THEM TO OUTLOOK Else MsgBox "Email not found in Outlook!", vbOKOnly + vbExclamation End If End Function





Reply With Quote