Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   Scanning E-mail for Certain words & changing the background (http://www.outlookbanter.com/outlook-vba/102707-scanning-e-mail-certain-words.html)

Rhutch[_2_] May 21st 10 09:50 PM

Scanning E-mail for Certain words & changing the background
 
Hello,
I have been asked to write a macro for Outlook that will scan an e-mail for
select words such as Voluntary, Surrender, etc. and then change the
background (highlight) those words found in an e-mail. I have used VBA in
Excel and Access but not in Outlook.

I looked through all 43 pages on the site and could not find a post to help.
Probably looked right past several.

Anyway, any help would be appreciated.

thanks,
--
rhutch

Sue Mosher [MVP][_4_] May 21st 10 10:51 PM

Scanning E-mail for Certain words & changing the background
 
In what version of Outlook? Highlight those words in an open message? In the
reading pane?
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54



"Rhutch" wrote:

Hello,
I have been asked to write a macro for Outlook that will scan an e-mail for
select words such as Voluntary, Surrender, etc. and then change the
background (highlight) those words found in an e-mail. I have used VBA in
Excel and Access but not in Outlook.

I looked through all 43 pages on the site and could not find a post to help.
Probably looked right past several.

Anyway, any help would be appreciated.

thanks,
--
rhutch


Rhutch[_2_] May 24th 10 04:30 PM

Scanning E-mail for Certain words & changing the background
 
Sue:

I tried several times to log into the Community newsgroup but couldn't seem
to get the web page to display after attempting to log-on. I finally get it
to respond. I have read your response and hopefully can provide the
information you requested. I am using version 2003 of Outlook at work. The
intent, I think, is to open an e-mail and run a macro that looks for certain
words. Once it finds an occurrence of one of the words, it highlights it,
and changes the background to a different color, such as yellow, then
continues to the end of the e-mail. The person who asked me to do this for
him apparently gets several e-mails a day, 30 or so pages long and currently
has to go through them manually to find the designated words.

Hope you get this.
Thanks very much for responding,
--
rhutch


"Sue Mosher [MVP]" wrote:

In what version of Outlook? Highlight those words in an open message? In the
reading pane?
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54



"Rhutch" wrote:

Hello,
I have been asked to write a macro for Outlook that will scan an e-mail for
select words such as Voluntary, Surrender, etc. and then change the
background (highlight) those words found in an e-mail. I have used VBA in
Excel and Access but not in Outlook.

I looked through all 43 pages on the site and could not find a post to help.
Probably looked right past several.

Anyway, any help would be appreciated.

thanks,
--
rhutch


Rhutch[_2_] May 27th 10 09:55 PM

Scanning E-mail for Certain words & changing the background
 
I was able to get some code that scans a Word document highlights a word the
user enters but it won't work on Outlook.

Sub FindRepetitiveWords()
'
' Find Repetitive Words Macro
' Macro recorded 11/6/2003 by Monica Burns

'//Get Info from User

'//Place information in variable sUserString and Insert into document

Dim sUserString As String

sUserString = InputBox("Please Enter The Word to Search For", "Word
Searching For")

Selection.Find.ClearFormatting
Selection.Find.Replacement.ClearFormatting
Selection.Find.Replacement.Highlight = True

With Selection.Find
.Text = sUserString
.Replacement.Text = sUserString
.Forward = True
.Wrap = wdFindContinue
.Format = True
.MatchCase = False
.MatchWholeWord = False
.MatchWildcards = False
.MatchSoundsLike = False
.MatchAllWordForms = False
End With

Selection.Find.Execute Replace:=wdReplaceAll

End Sub

If anybody can point me to something that would show how to conver t it
Outlook, I would appreciated it.

--
thanks,
rhutch


"Rhutch" wrote:

Sue:

I tried several times to log into the Community newsgroup but couldn't seem
to get the web page to display after attempting to log-on. I finally get it
to respond. I have read your response and hopefully can provide the
information you requested. I am using version 2003 of Outlook at work. The
intent, I think, is to open an e-mail and run a macro that looks for certain
words. Once it finds an occurrence of one of the words, it highlights it,
and changes the background to a different color, such as yellow, then
continues to the end of the e-mail. The person who asked me to do this for
him apparently gets several e-mails a day, 30 or so pages long and currently
has to go through them manually to find the designated words.

Hope you get this.
Thanks very much for responding,
--
rhutch


"Sue Mosher [MVP]" wrote:

In what version of Outlook? Highlight those words in an open message? In the
reading pane?
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54



"Rhutch" wrote:

Hello,
I have been asked to write a macro for Outlook that will scan an e-mail for
select words such as Voluntary, Surrender, etc. and then change the
background (highlight) those words found in an e-mail. I have used VBA in
Excel and Access but not in Outlook.

I looked through all 43 pages on the site and could not find a post to help.
Probably looked right past several.

Anyway, any help would be appreciated.

thanks,
--
rhutch



All times are GMT +1. The time now is 06:46 PM.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com