Simple Paste Macro Problem

P

PJB

I am new to Office 2007. I have created a very basic macro to add a paste
unformatted text button to the QAT. The same macro worked perfectly in Word
2003. This is very handy when cutting and pasting from the Internet and from
PDF files.

However, in Word 2007 the macro does not work. I still must go to Home >
Paste > Paste Special > Unformatted Text. This is too many steps for a
commonly used function.

Word 2007 offers more advanced settings for copy, cut, and paste functions
and I wonder if this is where my problem rests. I have tried various
combinations but have not solved my problem. I prefer keeping these settings
at their default settings.

Any thoughts?
 
G

Graham Mayor

The following will work

Sub PasteUnfText()
On Error GoTo Oops
Selection.PasteSpecial DataType:=wdPasteText, _
Placement:=wdInLine
End
Oops:
Beep
End Sub

http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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