macro for PasteSpecial Unformatted

B

Beth Mc

I've tried to create a macro for paste-special -- unformatted. I used the
"record new macro" option, but this is what my macro looks like. What do I
need to put instead of "(wdPasteDefault)"?

Sub UnformattedPaste()
'
' UnformattedPaste Macro
'
Selection.PasteAndFormat (wdPasteDefault)
End Sub
 
J

Jay Freedman

Beth said:
I've tried to create a macro for paste-special -- unformatted. I used
the "record new macro" option, but this is what my macro looks like.
What do I need to put instead of "(wdPasteDefault)"?

Sub UnformattedPaste()
'
' UnformattedPaste Macro
'
Selection.PasteAndFormat (wdPasteDefault)
End Sub

This is one of several situations where the recorder gets it completely
wrong. It isn't just the wdPasteDefault that's wrong, but PasteAndFormat is
the wrong method. Replace the whole line with this:

Selection.PasteSpecial DataType:=wdPasteText
 
B

Beth Mc

A

Anne Troy

Joined
Sep 12, 2013
Messages
1
Reaction score
0
I've tried to create a macro for paste-special -- unformatted. I used the
"record new macro" option, but this is what my macro looks like. What do I
need to put instead of "(wdPasteDefault)"?

Sub UnformattedPaste()
'
' UnformattedPaste Macro
'
Selection.PasteAndFormat (wdPasteDefault)
End Sub

--
Thanks,
Beth
This is only eight years old and I just did something that worked. Instead of [Selection.PasteAndFormat (wdPasteDefault)], try [Selection.PasteAndFormat (wdFormatPlainText)].
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top