Would not be great to be able to copy text into Word without having to worry about the source formatting and ignoring the return characters in the text? In this video, I explain how to do that by creating a simple macro and assigning the macro to a keyboard shortcut like Ctrl + Shift + V or Command + Shift + V.
⚠️ Join my channel to get access to perks: / @federicotartarini
🙏 Support my channel on Patreon at / federicotartarini
☕ Support my channel by buying me a coffee - https://www.buymeacoffee.com/FedericoT
✅ Let's connect:
🌍 My website - https://federicotartarini.github.io/
💻 GitHub - https://github.com/FedericoTartarini
Twitter - / federicotartar1
LinkedIn – / federico-tartarini
📝 Useful notes:
👨💻 Source code:
Sub PasteSpecial()
Dim oRng As Word.Range, lngS As Long
Set oRng = Selection.Range
lngS = oRng.Start
oRng.PasteSpecial DataType:=wdPasteText
oRng.Start = lngS
oRng.Select
If oRng.Characters.Last = Chr(13) Or oRng.Characters.Last = Chr(11) Then
oRng.End = oRng.End - 1
End If
oRng.Text = Replace(Replace(oRng.Text, Chr(11), " "), Chr(13), " ")
lbl_Exit:
Exit Sub
End Sub
🎥 Content of this video:
00:00 - What you will learn
🔣 Keywords:
#word #pastespecial #macro #microsoftword #productivity