Solved

Restrict Method in Outlook

Posted on 2001-06-19
7
724 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
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…

831 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