Macro not holding - 2003 SBE

J

Jan

The macro I have attempted to create is Edit/Paste Special/Unformatted Text.

Problem is.. that even though I have gone through the assign keyboard
CRTL+., recorded the macro (run macro Edit/PasteSpecial/Unformatted Text -
stop recording), when I go to use the command CRTL+. the font formatting is
being pasted into the document rather than the "unformatted text."

Can anyone tell me what I might be doing wrong?

Thanks for the help!!

Jan
 
G

Graham Mayor

This is not something you can record - use the following instead:

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

http://www.gmayor.com/installing_macro.htm

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


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

Jan

Thanks for the info, but I'm not having any luck. I went to your site so I
would insert correctly, but must be missing something.

From Word, ALT+F8.
Macro box appears.
Macro Name (PasteUnfText)
Create (and the following appears)

Sub PasteUnfText()
'
' PasteUnfText Macro
' Macro created March 11, 2008 by Jan Gavin
'

End Sub

I highlighted the above and pasted the commands in your reply leaving me
with the following in the macro create box

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

Save and return to Word

When perform a copy and then attempt to paste unformatted text using CRTL+.
nothing happens.

Thanks again for your help!

Jan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top