MS-Word Macros

Printer-friendly versionPrinter-friendly version

Find a Specific Word in the Document and Delete the Whole Paragraph Where It Located In

The following macro looks for a specific word (ABOUT) in the target document and when it finds it out, selects the whole paragraph where the word is located and deletes the paragraph. This macro is helpful mostly for story writers who, most of the times, come across this kind of context. Therefore Writers, Work hard on story theme but smart on content editing! What do you say!

Sub Word_Identify_Delete_Para()
Dim s As Integer
s = 0

Do Until s >= ActiveDocument.Paragraphs.Count
s = s + 1
ActiveDocument.Paragraphs(s).Range.Select
t = 0

Do Until t >= Selection.Words.Count
t = t + 1
If Selection.Words(t) = "about " Then
Selection.Cut
End If
Loop

Loop

End Sub

Hey! Whoever needs WORD MACROS, for ready use, can contact me for the Word Macro E-book at 3rdchallenge@gmail.com.