?
Solved

Restrict Method in Outlook

Posted on 2001-06-19
7
Medium Priority
?
766 Views
Last Modified: 2007-12-19
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
Comment
Question by:ernst8498
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
7 Comments
 
LVL 6

Expert Comment

by:PsychoDazey
ID: 6208072
Have you tried using ("[Subject] = "  & Like & ""Call Completion Analysis ?

0
 

Author Comment

by:ernst8498
ID: 6214789
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
 
LVL 6

Expert Comment

by:PsychoDazey
ID: 6215017
It was worth a shot.   Let me look through my outlook books and get back to you.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 6

Expert Comment

by:PsychoDazey
ID: 6216019
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
 

Author Comment

by:ernst8498
ID: 6216423
I will try this but I think I did and it did not work.  I will let you know..  Meanwhile keep looking..
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7139539
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
 
LVL 1

Accepted Solution

by:
Computer101 earned 0 total points
ID: 7173360
Question placed in PAQ

Computer101
E-E Moderator
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…
Suggested Courses
Course of the Month13 days, 15 hours left to enroll

801 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question