Skip to content

Instantly share code, notes, and snippets.

@aadennis
Created March 15, 2018 00:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aadennis/8194f52d384d6493dd2b9b66757f7f1a to your computer and use it in GitHub Desktop.
Save aadennis/8194f52d384d6493dd2b9b66757f7f1a to your computer and use it in GitHub Desktop.
Word vba - delete a line
Option Explicit
Sub DeleteLine()
'
' Utilities Macro
'
'
Application.ScreenUpdating = False
Selection.HomeKey Unit:=wdStory
With Selection.Find
.ClearFormatting
.Wrap = wdFindStop
.Text = "Uniqueid"
Do While .Execute
ActiveDocument.Bookmarks("\Line").Range.Delete
Loop
End With
Application.ScreenUpdating = True
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment