Paste Special Macro

  • Thread starter Thread starter korak
  • Start date Start date
K

korak

I'm still running Windows 2000 Professional while some of
my colleagues have switched over to XP. I created a macro
for myself in Word to make a keyboard command to do Paste
Special/unformatted text, which I use all the time. But
when I created the same macro for an XP user it didn't
work - well, it pasted the text but without removing the
formatting. Any thoughts on why this happened and how to
make it work in XP???
 
Hi korak

Please post the macro's code

Thanks

----- korak wrote: ----

I'm still running Windows 2000 Professional while some of
my colleagues have switched over to XP. I created a macro
for myself in Word to make a keyboard command to do Paste
Special/unformatted text, which I use all the time. But
when I created the same macro for an XP user it didn't
work - well, it pasted the text but without removing the
formatting. Any thoughts on why this happened and how to
make it work in XP??
 
Andrew

I don't know anything about visual basic, but below is the code for the macro that works in Word 2000 and then the code for the macro (created exactly the same way) that doesn't work in Word for XP. Thanks for your help

Word 2000 Code
Sub pastespecial(

' pastespecial Macr
' Macro recorded 3/26/2003 by kora

Selection.pastespecial Link:=False, DataType:=wdPasteText, Placement:=
wdInLine, DisplayAsIcon:=Fals
End Su

Word XP code
Sub pastespecial(

' pastespecial Macr
' Macro recorded 5/13/2004 by kora

Selection.PasteAndFormat (wdPasteDefault
End Sub
 
Use the Word 2000 version

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

from my machine works just fine in Word 2003


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

Web site www.gmayor.com
Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
 
Back
Top