Board index » delphi » Expression: [SenderName] LIKE "Michael"

Expression: [SenderName] LIKE "Michael"

Hi,

I use the Ole-Object "Application.Outlook" from Delphi V, and everything
works well. I now want to get some MailItems by using the Find/FindNext-
method. But I want to search for several substrings. For example:

I want to find the SenderNames:   "Michael Jordan", "Michael Best", ...

I cannot say as expression:  '[SenderName] LIKE "Michael"',
when I use '[SenderName] = "Michael"] only the Items are returned,
where SenderName is "Michael".

Can someone tell me the missing hint ?

thx a lot,
carsten willems

 

Re:Expression: [SenderName] LIKE "Michael"


<<Carsten Willems:
I want to find the SenderNames:   "Michael Jordan",
"Michael Best", ...

Quote

Use Delphi's Pos function, Outlook's Find method is not
very sophisticated.

--
Deborah Pate (TeamB) http://delphi-jedi.org

  Use Borland servers; TeamB don't see posts via ISPs
  http://www.borland.com/newsgroups/genl_faqs.html

Re:Expression: [SenderName] LIKE "Michael"


<<Deborah Pate (TeamB):
Outlook's Find method is not very sophisticated.

Quote

However, in the specific example you gave, you could just
look at the FirstName property instead of the SenderName...

--
Deborah Pate (TeamB) http://delphi-jedi.org

  Use Borland servers; TeamB don't see posts via ISPs
  http://www.borland.com/newsgroups/genl_faqs.html

Re:Expression: [SenderName] LIKE "Michael"


Quote
> However, in the specific example you gave, you could just
> look at the FirstName property instead of the SenderName...

Thanks, but I exactly want to search for substrings IN fields
(i.e. for "est" for getting "testing", ...). I just choosed this example
to explain ;)

But thanks for your answer, I now use pos() of Pascal, as also
suggested in this thread (thx ;)). This also solves the problem,
that I cant use FIND with the BODY-Field.

thx a lot for all ur help,
carsten willems

Other Threads