View Single Post
  #4   Report Post  
Posted to microsoft.public.word.docmanagement
garfield-n-odie [MVP] garfield-n-odie [MVP] is offline
external usenet poster
 
Posts: 2,587
Default How to default to "Unformatted Text" in "Paste Special" in Wor

In Word 2003 and earlier, it's a known issue that the macro
recorder yields incorrect results when recording the paste
special as unformatted text command. Instead, try using:

Sub PasteUnfText()
On Error GoTo oops
Selection.PasteSpecial DataType:=wdPasteText
End
oops:
Beep
End Sub

and then assign the macro to a toolbar button or a keyboard
shortcut to make it easy to run. See:
http://www.gmayor.com/installing_macro.htm
http://word.mvps.org/FAQs/Customizat...oToToolbar.htm
http://word.mvps.org/FAQs/Customizat...roToHotkey.htm .

These instructions were written for Word 2003 and earlier, and I
don't have Word 2007, so you'll have to experiment a bit to see
how much of this you can use in Word 2007.


Lucky Green wrote:

TedMi,
Unfortunately, recording a marcro for Paste Special - Unformatted Text does
not work in Word 2007 as described.

Recording the macro creates the following VB code:

SelectionPasteAndFormat (wdPasteText)

However, executing the macro via CTL-SHIFT-V simply pastes formatted text.

I also tried using SelectionPasteAndFormat DataType:=wdPasteText, which Word
2007 rejected outright.

Suggestions are appreciated,
--Lucky