December 18, 2007 12:01 AM PST

Create a keyboard shortcut to paste plain text

by Dennis O'Reilly
  • Font size
  • Print
  • 12 comments

Last week I described the PureText utility that lets you paste plain text in Word and other applications via a keyboard shortcut. You can create a macro to get the same functionality in Word and Excel, without having to download anything.

(Note that the original post of this tip reported that PureText required that you click its icon in your system tray before you press the shortcut keys to paste plain text. This is true only if you open the destination app after the material you want to paste has been added to the clipboard. If both the source and destination programs are open when you initially copy the text, you need only press PureText's shortcut key to paste the text without images, formatting, and other non-text elements. my thanks to the reader below for pointing out this error.)

Paste plain text in Word via the keyboard
In Word 2003, click Tools*Macro*Macros. In Word 2007, click View*Macros. In both versions, type PlainPaste in the Macro name field (you can name it anything you like, but the name must begin with a letter, have no spaces, and use no punctuation), and choose Create. Place the cursor at the beginning of the line just above "End Sub" and type Selection.PasteSpecial DataType:=wdPasteText. The only space in the line is between "PasteSpecial" and "Datatype:". Press Ctrl-s to save the macro, and click File*Close and Return to Microsoft Word.

The Microsoft Visual Basic Editor screen for creating a new macro.

Type this text in the penultimate line of your macro to paste plain text.

Now test the macro: Select a mix of text and other elements in your browser or some other application, press Ctrl-c to place it on the clipboard, return to Word, click Tools*Macro*Macros in Word 2003, or View*Macros in Word 2007, select PlainPaste in the list of Macros, and click Run. Only the text should appear, in the format of the document, not of the source.

Next, assign a keyboard shortcut to the macro: In Word 2003, click Tools*Customize*Commands, make sure Normal.dot is selected in the "Save in" drop-down menu, and click the Keyboard button. Scroll down the Categories list in the top left and select Macros. Choose PlainPaste (or whatever you named the macro) in the right pane, click in the "Press new shortcut key" box, type Ctrl-t (or the unused key combination of your choice, beginning with Ctrl, Alt, and/or Shift), select Assign and then Close twice.

To assign the keyboard shortcut in Word 2007, click the Office button in the top-left corner, choose Word Options at the bottom of the window, click Customize in the left pane, and then the Customize button to the right of "Keyboard shortcuts" at the bottom of the Word Options dialog box. Scroll to and select Macros in the Categories window, select the PlainPaste macro in the window to the right, click in the "Create new keyboard shortcut" field, type Ctrl-t (or your choice of combination, beginning with Ctrl, Alt, and/or Shift), click Assign, then Close, and finally OK.

The Customize Keyboard options screen in Microsoft Word.

Set a keyboard shortcut for your plain-paste macro in Word.

Give Excel a plain-paste keyboard shortcut
Here's the fastest way I know of to create a plain-paste keyboard shortcut in Microsoft Excel: First, select any text and press Ctrl-c to place it in the clipboard. In Excel 2003, click Tools*Macro*Record New Macro. In Excel 2007, click View*Macros*Record Macro. Enter a name in the "Macro name" field, beginning with a character, and without any spaces or punctuation. Click in the "Shortcut key" box, type t (or the letter of your choice, as long as it isn't already assigned to a shortcut that begins with Ctrl), and press OK. In Excel 2003, click Edit*Paste Special*Text*OK, and press the Stop Recording button on the tiny toolbar that popped up when you closed the Record Macro dialog box. In Excel 2007, click Home*Paste*Paste Special*Text*OK*View*Stop Recording.

When you close Excel, you'll be asked if you want to save the changes in the Personal Macro Workbook. Click Yes to make the shortcut available when you reopen the application.

Tomorrow: The (selective) return of smart quotes in Microsoft Word.

Dennis O'Reilly has covered PCs and other technologies in print and online since 1985. Along with more than a decade as editor for Ziff-Davis's Computer Select, Dennis edited PC World's award-winning Here's How section for more than seven years. He is a member of the CNET blog Network, and is not an employee of CNET.
Recent posts from Workers' Edge
Time to update the software user's bill of rights
Put Task Manager in Windows' notification area
Windows diagnostic tool big on info, short on help
Three more ways to slice and dice the Web
Firefox note-taking add-ons are Web supersavers
The best of Windows 7's new interface features
Four ways to reduce your PC's carbon footprint
Five tips for safe Web shopping
Add a Comment (Log in or register) (12 Comments)
  • prev
  • 1
  • next
by dsk_nj December 18, 2007 4:58 AM PST
You apparently missed the point entirely. You don't need to click anything to paste unformatted text. Just use the hot key. Frankly, if I had to click somewhere to paste plain text, the value of the utility would be reduced to the point of a "so what". The documentation might have been a little clearer, I suspect, but if you are clicking on the tray icon you're working WAY too hard.
Reply to this comment
by doreilly December 18, 2007 2:09 PM PST
I'm using the latest version of PureText, and the only way I can get the plain-paste shortcut to work is by placing the text in the clipboard by pressing Ctrl-c, then clicking the "PT" icon in the system tray, and finally pressing the Windows key and v. If I don't click the system-tray icon, nothing pastes. What am I missing?
by doreilly December 18, 2007 2:26 PM PST
Upon further review, it appears that to paste plain text without having to click the PureText icon, the application into which you're pasting has to be open before the content is placed into the clipboard. I was copying the material from a Web page, and then opening the program I wanted to paste it into. When both the destination app is open when the material is placed into the clipboard, the Windows key-v combination pastes the plain text without having to click the PureText icon. (At least the macro approach saves you a download.) Thank you for pointing out the error.
by Jack K1 December 18, 2007 7:29 AM PST
It's not a wise idea to save macros in Normal.dot (though it is easiest, and it is the default). Too many organizations choose to use Normal.dot for their own purposes (they shouldn't but they do). As a result, any time the organization decides to update this template, the user will lose his or her macros and have to start all over again. Naturally, this can be very frustrating. Users should instead create their own template in which to store their personal macros.
Reply to this comment
by doreilly December 18, 2007 2:12 PM PST
Won't people who create and use their own template for the plain-paste macro lose access to their organization's custom macros in the Normal.dot template? Or is there a way to merge the two templates in some way?
by Wookiee-1138 December 18, 2007 3:49 PM PST
Would this work in OpenOffice?
Reply to this comment
by firefly-18 December 18, 2007 3:54 PM PST
Thanks for this handy little trick. I have Office 2002 but the steps were still very similar. I shall be using this quite a bit I'd imagine
Reply to this comment
by WDS2 December 19, 2007 10:19 AM PST
I wish there was a way to make pasting plain text the default for any ^v paste. 99.44% of the time that's all I want to do.
Reply to this comment
by timada42 July 16, 2008 4:40 AM PDT
Should this work with office 2007 too? I would like to try this. It looks like a good tip that will make my daily work lot easier! Thank you for it! Thumb?s up!
_______________________________________________
Ada - Technology Transfer opportunties
Reply to this comment
by haywardz February 11, 2009 2:07 PM PST
Thank you so much for this tip. Extremely helpful to me! It worked great.
Reply to this comment
by grayforge September 1, 2009 12:10 PM PDT
Late post, but awesome trick and extremely clear instructions.

How about a more universal plainPaste? IE, one that works in Outlook as well?

Thanks!
Reply to this comment
by UtaScholz December 8, 2009 12:23 PM PST
Like previously reviewed page minimizersBareSite and Finch, IYHY returns just the basic text of the site you plug into it. With Lifehacker.com and and news.google.com as our test sites, though, IYHY beat the two previous sites hands down for clarity and condensation. Formatting is cleaner, no images were mistakenly thrown back into the mix, comments were still visible, and with IYHY there were no annoying [IMAGE] tags scattered throughout the stripped content. For mobile browsing or surreptitious reading at the office, IYHY does a suber job stripping all non-text elements from a site. <a href="http://www.bestessays.ca/">essay writing service</a> helped me a lot. They advice me some stuffs to try with IYHY. There is no login required for the basic proxy service, but with a free account you can save your most frequently accessed sites to save some time?and your thumbs.
Reply to this comment
(12 Comments)
  • prev
  • 1
  • next
advertisement
Click Here

15 sites that went kaput in 2009

Web sites launch all the time, but they also shut their doors. We highlight 15 that bit the dust this year.

Top 10 news stories of the decade

Let the debate begin: Was the iPhone more important than iTunes? Was anything bigger than Google finding a great business model? CNET offers its list of the 10 most important stories of the '00s.

About Workers' Edge

Dennis O'Reilly has covered PCs and other technologies in print and online since 1985. Along with more than a decade as editor for Ziff-Davis's Computer Select, Dennis edited PC World's award-winning Here's How section for more than seven years. He is a member of the CNET Blog Network and is not an employee of CNET.

Add this feed to your online news reader

Workers' Edge topics

advertisement
advertisement

Inside CNET News

Scroll Left Scroll Right