Skip to content

Instantly share code, notes, and snippets.

@aadennis
Created May 27, 2018 13:50
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/bacd08d2985328189093eaccbf2075a7 to your computer and use it in GitHub Desktop.
Save aadennis/bacd08d2985328189093eaccbf2075a7 to your computer and use it in GitHub Desktop.
Sub NoLineFeed()
' For the selected range, delete all carriage returns
' Typical usecase for this is when some copying action has resulted in
' the clipboard containing physical linefeeds, when only logical ones
' were intended.. and the paste into Word has carried that forward
With Selection.Range
.Text = Replace(.Text, vbCr, "")
End With
End Sub
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment