Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Programming / March 2008

Tip: Looking for answers? Try searching our database.

Simple macro for 'paste unformatted text' won't work

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
rodmac - 16 Mar 2008 21:32 GMT
Can anyone here help me with this weirdness? Just downloaded Word2007, and
do a ton of pasting as unformatted text. I really want this as a keyboard
shortcut, which I have relied on for years.

I can't find Paste Special: Unformatted Text on the All Commands list - it
was there in Word 2000, my last version - and it isn't in the default
macros.

When I try to record a simple macro using the mouse, the resulting macro
consistently pastes the source formatting, not unformatted text. If I just
use the interface, the paste unformatted text works fine.

The macro recorder won't record the sequence, and I get this:

Sub PasteAsText()
'
' PasteAsText Macro
'
'
   Selection.PasteAndFormat (wdPasteDefault)
End Sub

If I knew what paste unformatted was I would just edit the macro, but I
haven't a clue about VBA or whatever this language is.

Any help appreciated.

Rod
macropod - 17 Mar 2008 01:23 GMT
Hi Rod,

Try:

Sub PasteUnformattedText()
' The next line is in case there's nothing in the Clipboard
On Error Resume Next
Selection.PasteSpecial DataType:=wdPasteText
End Sub

Cheers
Signature

macropod
[MVP - Microsoft Word]
-------------------------

> Can anyone here help me with this weirdness? Just downloaded Word2007, and
> do a ton of pasting as unformatted text. I really want this as a keyboard
[quoted text clipped - 24 lines]
>
> Rod
rodmac - 17 Mar 2008 05:15 GMT
Thanks a lot, macropod! Your macro did the trick and I'm back in fast
one-key text-pasting business.

R

> Hi Rod,
>
[quoted text clipped - 35 lines]
>>
>> Rod
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.