Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 823
  • Last Modified:

Restrict Method in Outlook

I am using the restrict method as follows....

 Set olRestrictedItems = olFolder.Items.Restrict("[Subject] = ""Call Completion Analysis - Global Summary - Huggies (Created by Dan Neubauer)""")

Is there a way to restrict using wild cards or something.  I really just need to restrict based on the string "Call Completion Analysis".  However, the subject field will containt longer and differing strings in each email.

Thx.
0
ernst8498
Asked:
ernst8498
1 Solution
 
PsychoDazeyCommented:
Have you tried using ("[Subject] = "  & Like & ""Call Completion Analysis ?

0
 
ernst8498Author Commented:
The Like is not a word that works.  Is not a vb keyword or an operator that works with this method.  Thanks for the idea.
0
 
PsychoDazeyCommented:
It was worth a shot.   Let me look through my outlook books and get back to you.
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
PsychoDazeyCommented:
Have you tried this:
Set olRestrictedItems = olFolder.Items.Restrict("[Subject] = ""Call Completion Analysis*""")
I found this in a cd I have, when I look up restrict it refers me to find:
object.Find(Name, Custom)

object   Required. An expression that returns a UserProperties object.

Filter   Required String. An expression that will evaluate to True or False.

The filter is a string expression containing one or more filter clauses joined by the logical operators And, Not, and Or.

A filter clause is a simple expression that evaluates to True or False; for example, [CompanyName] = "Microsoft".

Note that property names can be used in the expression and are identified and delimited by square brackets. Except for these bracketed property names, only literals are allowed within the expression ? variables and constants are not evaluated.

Comparison operators allowed within the filter expression include >, <, >=, <=, = and <>.

Logical operators allowed are And, Not and Or.

I'll keep looking, dont lose hope yet.
0
 
ernst8498Author Commented:
I will try this but I think I did and it did not work.  I will let you know..  Meanwhile keep looking..
0
 
DanRollinsCommented:
Hi ernst8498,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Refund points and save as a 0-pt PAQ.

EXPERTS: Post a comment if you are certain that an expert deserves credit.  Explain why.
==========
DanRollins -- EE database cleanup volunteer
0
 
Computer101Commented:
Question placed in PAQ

Computer101
E-E Moderator
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now