A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Tags: , , , , ,

Exact string comparison of Subject Field in emails





 
 
Thread Tools Display Modes
  #1  
Old August 18th 08, 04:12 PM posted to microsoft.public.outlook.program_vba
Ron_D
external usenet poster
 
Posts: 7
Default Exact string comparison of Subject Field in emails

Good morning,
The built-in Rules wizard in Outlook doesn't look for differences between
upper/lower case letters. So I'm trying to create VBA codes that will look
at a subject of an email and compare it to what it should be. I'm trying to
use the exact function, because I'm familiar with that in Excel. But in
Outlook I'm getting an error.

Code:

if Exact(Text)="THIS is THE Text" then
' do something
end if
Ads
  #2  
Old August 18th 08, 04:52 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Exact string comparison of Subject Field in emails

It would be simply:

if Text="THIS is THE Text" then

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx



"Ron_D" wrote:

Good morning,
The built-in Rules wizard in Outlook doesn't look for differences between
upper/lower case letters. So I'm trying to create VBA codes that will look
at a subject of an email and compare it to what it should be. I'm trying to
use the exact function, because I'm familiar with that in Excel. But in
Outlook I'm getting an error.

Code:

if Exact(Text)="THIS is THE Text" then
' do something
end if

  #3  
Old August 18th 08, 06:50 PM posted to microsoft.public.outlook.program_vba
Ron_D
external usenet poster
 
Posts: 7
Default Exact string comparison of Subject Field in emails

Thank you, Sue, for all your help!!! That did the trick.

"Sue Mosher [MVP-Outlook]" wrote:

It would be simply:

if Text="THIS is THE Text" then

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx



"Ron_D" wrote:

Good morning,
The built-in Rules wizard in Outlook doesn't look for differences between
upper/lower case letters. So I'm trying to create VBA codes that will look
at a subject of an email and compare it to what it should be. I'm trying to
use the exact function, because I'm familiar with that in Excel. But in
Outlook I'm getting an error.

Code:

if Exact(Text)="THIS is THE Text" then
' do something
end if

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook Form and the Subject Field roblowein Outlook - General Queries 1 January 4th 07 05:30 PM
Automatic Text in Subject Field Dries Goossens Outlook and VBA 1 October 10th 06 07:58 AM
Edit Subject Field Meeme Outlook - Calandaring 2 April 18th 06 02:59 PM
Need String from Email Subject CondtllyFrmttd Outlook and VBA 1 January 25th 06 05:26 PM
Use Part of Subject as String CondtllyFrmttd Outlook - General Queries 0 January 23rd 06 07:57 PM


All times are GMT +1. The time now is 05:30 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2008 Outlook Banter, part of the NewsgroupBanter project.
The comments are property of their posters.
Submit articles - Credit Card Consolidation - Bad Credit Loan - Mortgage Calculator - Hindi movies, hindi songs