Created
June 21, 2016 10:33
-
-
Save ghanique/1c9b538ea49ef4b3e30fcac9c16cc803 to your computer and use it in GitHub Desktop.
VBA Macro to delete a paragraph in Word
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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