Skip to content

Instantly share code, notes, and snippets.

@ghanique
Created June 21, 2016 10:33
Show Gist options
  • Save ghanique/1c9b538ea49ef4b3e30fcac9c16cc803 to your computer and use it in GitHub Desktop.
Save ghanique/1c9b538ea49ef4b3e30fcac9c16cc803 to your computer and use it in GitHub Desktop.
VBA Macro to delete a paragraph in Word
Public Sub DeleteParagraph()
On Error GoTo ErrorHandler
Call Selection.Range.Paragraphs(1).Range.Delete
GoSub Finally
Exit Sub
Finally:
Return
ErrorHandler:
Debug.Print Err.Number; Err.Description
GoSub Finally
Exit Sub
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment