![]() |
#5
|
|||
|
|||
![]()
I forgot to execute the find to fill the found property.
.Execute Code:
Sub SearchTest() ' Charles Kenyon ' If word not found skip rest of macro Const strWORDTOFIND As String = "Test" With ActiveDocument.Range.Find Let .Text = strWORDTOFIND .Execute If .Found = False Then GoTo endofsub End With ' Rest of macro here MsgBox strWORDTOFIND & " is present." endofsub: End Sub |
Tags |
nubie, search and replace |
|