Following is code for a spike_text macro that automates the process:
Sub spike_text()
'
' spike_text Macro
' Move selected text to the end of the document
'
If Selection.Type = wdSelectionNormal Then
Selection.Cut
Selection.EndKey Unit:=wdStory
Selection.TypeParagraph
Selection.Paste
Application.GoBack
Application.GoBack
Else
MsgBox "Nothing to spike"
End If
End Sub
This macro contains an if-else structure. The if test determines whether text is selected. If so, the text is cut and pasted at the end of the document. When text isn't selected, the else part of the equation displays a message box with the text "Nothing to spike."
This macro was recorded initially and used these keystrokes:
- Ctrl+X
- Ctrl+End
- Ctrl+V
- Shift+F5, Shift+F5 The Shift+F5 keyboard shortcut returns you to the previous editing location in the document.