Access & Outlook problem

A

amiga1200

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'
 
A

amiga1200

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top