LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default Search Word document based on text in Excel cell.

Thanks Isabelle!

I've tried it but without success.
I think it's not really jumping to Word to find the text isn't it?

I've used the following code:

Sub MacroIsab()
Dim keywords As String, c As Range, n As Integer
keywords = "verliep" ' adapt
With Worksheets(1).Range("a1:a500")
Set c = .Find(keywords, LookIn:=xlValues, LookAt:=xlPart)
If Not c Is Nothing Then
firstAddress = c.Address
Do
n = Application.Find(keywords, c)
With c.Characters(Start:=n, Length:=Len(keywords))
.Font.Color = RGB(255, 0, 0)
End With
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address < firstAddress

End If
End With
End Sub


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I search for a word within a excel document Jenny Excel Discussion (Misc queries) 2 January 14th 10 03:55 PM
How do I search for a word and add text to a cell if found? Bie1997 Excel Programming 1 March 17th 08 11:15 PM
Print Word document based on Excel dialog selections Kevin R Excel Programming 0 March 19th 07 03:33 PM
moving text from a word document to excel gregp22 New Users to Excel 2 March 21st 06 06:18 PM
Macro to copy cell data to word document based on an active row? Brian Excel Programming 2 September 16th 04 01:55 PM


All times are GMT +1. The time now is 02:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"