Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Paste Special Macro
I have recorded a macro and assigned it to a button. The macro was recorded
by selecting Edit\Paste Special then select un-formatted text and then OK. This is the result when you go to edit macro; Sub PasteSpecial() Selection.PasteAndFormat (wdPasteDefault) End Sub The problem is it pastes all, not just the text. Can anyone tell me how to set up this macro? Regards Nick PS. Im using Word 2003 |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Paste Special Macro
The macro recorder does not always do the trick. In this case you need
Sub PasteUnfText() On Error GoTo oops Selection.PasteSpecial _ DataType:=wdPasteText, _ Placement:=wdInLine End oops: Beep End Sub The error trapping if to prevent the crash that occurs if you have nothing selected when you run the macro. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org hfrupn wrote: I have recorded a macro and assigned it to a button. The macro was recorded by selecting Edit\Paste Special then select un-formatted text and then OK. This is the result when you go to edit macro; Sub PasteSpecial() Selection.PasteAndFormat (wdPasteDefault) End Sub The problem is it pastes all, not just the text. Can anyone tell me how to set up this macro? Regards Nick PS. I'm using Word 2003 |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
Paste Special Macro
Thanks Graham, worked a treat
"Graham Mayor" wrote: The macro recorder does not always do the trick. In this case you need Sub PasteUnfText() On Error GoTo oops Selection.PasteSpecial _ DataType:=wdPasteText, _ Placement:=wdInLine End oops: Beep End Sub The error trapping if to prevent the crash that occurs if you have nothing selected when you run the macro. -- Graham Mayor - Word MVP My web site www.gmayor.com Word MVP web site http://word.mvps.org hfrupn wrote: I have recorded a macro and assigned it to a button. The macro was recorded by selecting Edit\Paste Special then select un-formatted text and then OK. This is the result when you go to edit macro; Sub PasteSpecial() Selection.PasteAndFormat (wdPasteDefault) End Sub The problem is it pastes all, not just the text. Can anyone tell me how to set up this macro? Regards Nick PS. I'm using Word 2003 |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
problem creating a Word paste special macro | Microsoft Word Help | |||
Paste Special | Microsoft Word Help | |||
Where can I find the old "Paste Special" (Edit/Paste Special)? | Microsoft Word Help | |||
Paste Special Macro | Microsoft Word Help | |||
What is the difference in using 'paste' and 'paste special'? | Microsoft Word Help |