#1   Report Post  
Posted to microsoft.public.word.docmanagement
hfrupn hfrupn is offline
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default 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   Report Post  
Posted to microsoft.public.word.docmanagement
hfrupn hfrupn is offline
external usenet poster
 
Posts: 2
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem creating a Word paste special macro mcloo Microsoft Word Help 1 July 3rd 08 01:10 AM
Paste Special jojo_12 Microsoft Word Help 1 March 22nd 08 01:09 AM
Where can I find the old "Paste Special" (Edit/Paste Special)? Jacques Microsoft Word Help 1 June 6th 06 04:24 PM
Paste Special Macro coachmike Microsoft Word Help 2 July 7th 05 09:53 PM
What is the difference in using 'paste' and 'paste special'? butchkn Microsoft Word Help 5 February 21st 05 06:40 PM


All times are GMT +1. The time now is 12:04 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"