Solved

Restrict Method in Outlook

Posted on 2001-06-19
7
752 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
Independent Software Vendors: 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

[Webinar] Learn How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

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

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…

691 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