C
constance
Hi everybody,
I'm trying to write a function which searches a expression and not
word
I have this macro who search the word "formation"
Sub searchFormation()
Dim intCount As Integer
Dim strSearch As String
Dim str As String
'Permet de n'activer la macro qu'une fois sur un même document
strSearch = "formation"
For intCount = 1 To ActiveDocument.Words.Count
With ActiveDocument
str = LCase(Trim(ActiveDocument.Words(intCount)))
If (LCase(Trim(ActiveDocument.Words(intCount))) = strSearch) Then
Response = MsgBox("Word found.", vbOKOnly, "Error")
End If
End With
Next
End Sub
I want a macro which searches an expression of words like "formatio
:".
can somebody help me ?
Thanks
Lyn
I'm trying to write a function which searches a expression and not
word
I have this macro who search the word "formation"
Sub searchFormation()
Dim intCount As Integer
Dim strSearch As String
Dim str As String
'Permet de n'activer la macro qu'une fois sur un même document
strSearch = "formation"
For intCount = 1 To ActiveDocument.Words.Count
With ActiveDocument
str = LCase(Trim(ActiveDocument.Words(intCount)))
If (LCase(Trim(ActiveDocument.Words(intCount))) = strSearch) Then
Response = MsgBox("Word found.", vbOKOnly, "Error")
End If
End With
Next
End Sub
I want a macro which searches an expression of words like "formatio
:".
can somebody help me ?
Thanks
Lyn