Getting certain subjects from O2003

  • Thread starter Thread starter Animal
  • Start date Start date
A

Animal

Hi:

I have a bit of code that I am running directly in AC2003 to import emails
from oulook. Everything works perfectly except that I can not get emails
meeting a certain criteria. I need all emails that start with ABC* (see
code below). I have tried lots of different possibilities but all fail. I
would really appreciate any help here.

....
If OlMail.UnRead = True Then
OlMail.UnRead = False 'Mark mail as read
Rst.AddNew
Rst!Name = OlMail.SenderName
If InStr(1, OlMail.Subject, "ABC*") > 0 Then
....

Thanks
 
try:
If OlMail.Subject like "ABC*" Then

or

If InStr(1, OlMail.Subject, "ABC") > 0 Then
 
Back
Top