My goal is to save all the paragraphs starting with the word "transcript" and after that, delete all those "transcript" at the beginning of all the remaining paragraphs since they all have it.
Here's my code so far:
Code:
Sub Para()
Dim oPara As Paragraph
For Each oPara In ActiveDocument.Paragraphs
If InStr(1, oPara.Range.Words(1).Text, "transcript") = False Then
oPara.Range.Delete
oPara.Range.Delete
ElseIf InStr(1, oPara.Range.Words(1).Text, "transcript") = True Then
oPara.Range.Words(1).Text = Replace(oPara.Range.Words(1).Text, "Keep ", "")
End If
Next
End Sub
The problem is that this code will delete all of the paragraphs. Could someone help me out on this issue? Thank you very much!