judgehopkins
Technical User
Code:
Sub PasteSpecialUnformatted()
'
' PasteSpecialUnformatted Macro
'
'
Selection.Collapse Direction:=wdCollapseStart
Selection.PasteSpecial DataType:=wdPasteText
End Sub
Code:
Sub test()
'
' test Macro
'
'
Selection.PasteAndFormat (wdPasteDefault)
End Sub
I got the first macro from Word's help files.
When I select text to replace and run the macro, it correctly inserts the contents of the clipboard but does not replace the selected text.
I got the second macro by recording the keystrokes for paste special/unformatted text.
When I select text to replace and run the macro, it correctly inserts the contents of the clipboard and does replace the selected text, but it is not unformatted text.
What am I doing wrong?
Thanks!
There are two guaranteed rules of success: First, never tell everything you know.