Reply
 
Thread Tools Display Modes
  #1   Report Post  
SeanWhit
 
Posts: n/a
Default Why does the paste unformatted text function not work in macros?

In my old version of Word (2000) I programmed a small macro that did "Paste
Special - Unformatted Text" - I assigned this to a button and used it
whenever pasting text into a document from another source (e.g. the Web). Now
I have Word 2003 and this same macro doesn't work. I can program it fine, but
then when I run it, the text gets pasted in with its own formatting.
  #2   Report Post  
Graham Mayor
 
Posts: n/a
Default

Maybe you didn't program it as well as you thought? Try

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


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




SeanWhit wrote:
In my old version of Word (2000) I programmed a small macro that did
"Paste Special - Unformatted Text" - I assigned this to a button and
used it whenever pasting text into a document from another source
(e.g. the Web). Now I have Word 2003 and this same macro doesn't
work. I can program it fine, but then when I run it, the text gets
pasted in with its own formatting.



  #3   Report Post  
Daiya Mitchell
 
Posts: n/a
Default

Just by the way, I think we've seen reports before that there's a glitch in
the macro recorder relating to Paste Special Unformatted. Yet recording the
action via the Paste Options button works fine.

On 6/9/05 8:35 PM, "Graham Mayor" wrote:

Maybe you didn't program it as well as you thought? Try

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


  #4   Report Post  
Sean Whittaker
 
Posts: n/a
Default

Thank you very much for that tip - it worked perfectly! I think that this is
a bug in Word - I noticed that if you try to record this macro, it uses the
function Selection.PasteAndFormat rather than Selection.PasteSpecial.

I really appreciate the help - this had been driving me crazy for quite some
time.

"Graham Mayor" wrote:

Maybe you didn't program it as well as you thought? Try

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


--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org




SeanWhit wrote:
In my old version of Word (2000) I programmed a small macro that did
"Paste Special - Unformatted Text" - I assigned this to a button and
used it whenever pasting text into a document from another source
(e.g. the Web). Now I have Word 2003 and this same macro doesn't
work. I can program it fine, but then when I run it, the text gets
pasted in with its own formatting.




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
Can autocomplete insert unformatted text into a document? Daiya Mitchell Microsoft Word Help 1 February 22nd 05 02:23 PM
shortcut key for paste special > unformatted text Mike B Microsoft Word Help 1 February 3rd 05 11:08 PM
Paste exact text as formatted in another document? Top Spin New Users 3 January 12th 05 07:17 AM
Outline Renee Hendershott Page Layout 2 December 25th 04 02:49 PM
Is paste special the only way to insert unformatted text Lucian Sitwell Microsoft Word Help 3 December 15th 04 08:40 PM


All times are GMT +1. The time now is 10:12 AM.

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"