Solved

Restrict Method in Outlook

Posted on 2001-06-19
7
712 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
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
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Introduction I needed to skip over some file processing within a For...Next loop in some old production code and wished that VB (classic) had a statement that would drop down to the end of the current iteration, bypassing the statements that were c…
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

746 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

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now