jag har hittat ett macro script till word där den söker efter ett valfritt ord.. enda grejen är att jag måste själv skriva in "meddelande" i själva sök rutan.. är det någon som är bra på script som vet hur koden ska se ut för att SLIPPA skriva in sök ordet hela tiden? så att ordet "meddeLANDE" AUTOMATISKT dyker upp i sök fältet? såhär ser macro scriptet ut:
Sub Find()
Dim MyCount As Integer
Dim MyWord As String
Dim Total As Integer
Dim intI As Integer
'Prompt the user for the word to search for.
MyWord = InputBox("Skriv Meddelande i fältet")
'Select the entire document
Selection.WholeStory
'Count the total number of words in the document
Total = Application.Selection.Range.Words.Count
'Enumerate through each word selected, removing leading
' and trailing spaces
For intI = 1 To Total
With Selection.Words(intI)
If Trim(.Text) = MyWord Then
MyCount = MyCount + 1
End If
End With
Next intI
'Display results
MsgBox "Found " & MyCount & " occurrences of: " & MyWord & _
" out of a total of: " & Total & " words"
End Sub