Restrict a collection

  • Thread starter Thread starter Susan Lammi
  • Start date Start date
S

Susan Lammi

I am trying to create a collection of messages from a folder which contain
a specific string in the subject

is there a way to create a filter to use with items.restrict or must I
loop thru the collection and examine each message.

I have tried items.restrict("[Subject] Like strSubject") but that won't
work.....

Thanks
Sue
 
"Like" is not a supported operator. You can use =, >, <.

You didn't say what Outlook version you're using or what kind of application
you're building.
 
Thanks Sue I suspected as much. I can loop thru the items and get the
same results.
FYI
I am writing an application to extract attachments from certain e-mails
and store them in specified windows folders.

Thanks again


Sue Mosher said:
"Like" is not a supported operator. You can use =, >, <.

You didn't say what Outlook version you're using or what kind of application
you're building.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Susan Lammi said:
I am trying to create a collection of messages from a folder which contain
a specific string in the subject

is there a way to create a filter to use with items.restrict or must I
loop thru the collection and examine each message.

I have tried items.restrict("[Subject] Like strSubject") but that won't
work.....

Thanks
Sue
 
But for what Outlook version?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Susan Lammi said:
Thanks Sue I suspected as much. I can loop thru the items and get the
same results.
FYI
I am writing an application to extract attachments from certain e-mails
and store them in specified windows folders.

Thanks again


Sue Mosher said:
"Like" is not a supported operator. You can use =, >, <.

You didn't say what Outlook version you're using or what kind of application
you're building.

Susan Lammi said:
I am trying to create a collection of messages from a folder which contain
a specific string in the subject

is there a way to create a filter to use with items.restrict or must I
loop thru the collection and examine each message.

I have tried items.restrict("[Subject] Like strSubject") but that won't
work.....

Thanks
Sue
 
Sorry....

I am developing in 2000.....


Sue Mosher said:
But for what Outlook version?

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Susan Lammi said:
Thanks Sue I suspected as much. I can loop thru the items and get the
same results.
FYI
I am writing an application to extract attachments from certain e-mails
and store them in specified windows folders.

Thanks again


Sue Mosher said:
"Like" is not a supported operator. You can use =, >, <.

You didn't say what Outlook version you're using or what kind of application
you're building.

I am trying to create a collection of messages from a folder which contain
a specific string in the subject

is there a way to create a filter to use with items.restrict or must I
loop thru the collection and examine each message.

I have tried items.restrict("[Subject] Like strSubject") but that won't
work.....

Thanks
Sue
 
Too bad. If you were using Outlook 2002 or 2003, you would have the option
of using the Application.AdvancedSearch method, which allows a more powerful
SQL-like syntax for running searches.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers



Susan Lammi said:
Sorry....

I am developing in 2000.....


Sue Mosher said:
But for what Outlook version?

Susan Lammi said:
Thanks Sue I suspected as much. I can loop thru the items and get the
same results.
FYI
I am writing an application to extract attachments from certain e-mails
and store them in specified windows folders.

Thanks again


"Like" is not a supported operator. You can use =, >, <.

You didn't say what Outlook version you're using or what kind of
application
you're building.
I am trying to create a collection of messages from a folder which
contain
a specific string in the subject

is there a way to create a filter to use with items.restrict or must I
loop thru the collection and examine each message.

I have tried items.restrict("[Subject] Like strSubject") but that
won't
work.....

Thanks
Sue
 
Back
Top