Hi.
I am creating a macro, that will detete a text starting with “START” and ending with “END”. In between it can be whatever. How do I state that in my macro? I can make it delete a specific string, but haw do I use “*” When I state the text string to search for?
This is what I have so far:
Sub wordmacro()
Dim strSearch As String
Dim rgeStart As Range
Set rgeStart = Selection.Range
strSearch = “Start * end”
‘ ABOVE I NEED THE CORRECT STRING!!!!
With ActiveDocument.Range.Find
.Text = strSearch
Do While .Execute
With .Parent
.Select
With Selection
.Range.Delete
.Characters(1).Delete
End With
End With
Loop
End With
rgeStart.Select
Application.Browser.Target = wdBrowsePage
End Sub