![]() |
|
|
|
#1
|
||||
|
||||
|
If you don't want to change the selection, you use Ranges instead Code:
Sub aTest()
Dim aRng As Range
Set aRng = ActiveDocument.Range
With aRng.Find
.ClearFormatting
.Text = "keyword"
.Font.Size = 10
.Font.Name = "Verdana"
.Forward = True
.Wrap = wdFindStop
.Execute
If .Found = True Then
MsgBox "Found at: " & aRng.Start
Else
MsgBox "Not found"
End If
End With
End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
|
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
Finding raised characters by 0.5 pt step (Font.Position pb)
|
iwonder | Word VBA | 3 | Yesterday 01:25 PM |
Only display rows containing a keyword?
|
King Mustard | Excel | 2 | 04-07-2017 12:06 AM |
| Textboxes position isn't equal to initial position | dxdevil | Word VBA | 0 | 01-30-2017 04:32 AM |
Finding the graphics and inserting the keyword
|
Ajay2506 | Word VBA | 4 | 06-28-2016 05:34 AM |
Multiple keyword search in WORD
|
tvincent8118 | Word VBA | 1 | 06-23-2015 04:45 AM |