Access & Outlook problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to find all emails that's subject contains a predefined String
but All I keep getting are Errors.
I have found several options through MSDN but neither seem to work, they are
..Restrict or myFolder.Item(string)
When I try to use
->Set myMail = myFolder.Restrict("[Subject] > '" & String & "'")
I get the error 'Object doesn't support this property or method' regardless
of what is between the brackets
When I try to use
->Set myMail = myFolder.Items(String)
I get the error 'Object required'
 
I have managed to cure this problem, but now when I use the following code
Fltr = "[Subject] Like " & Chr(34) & Fltr & Chr(34)
Set myMail = myFolder.Restrict(Fltr)
I get the following error message
Condition not valid
When I use
Fltr = "[SentOn] > " & Chr(34) & "01/11/2005" & Chr(34)
Everything works fine

Thanks
 
Back
Top