Return to LaurenceHolbrook.com Technical Information Index

Paste Unformatted Text

Q: Whenever I cut text from, say, the Web, and try to paste it into a Word doc, Microsoft Word insists on retaining the format that came with the text. I'm sick of having to pull up Paste Special each and every time. Do you know of a way to get around this?

A: It seems like I spend an inordinate amount of time grabbing text from all sorts of places and sticking it into Word documents. The Ctrl-C key combination (which copies text to the clipboard) and Ctrl-V key combination (which pastes text) get such a heavy workout on my machines that I think I hear them sigh from time to time.

Cutting and pasting should be easy, but, unfortunately, Microsoft Word tends to get in the way. When I hit Ctrl-V to paste text into a document, 99 percent of the time I want the pasted text to take on the formatting that's already in the document I'm pasting the text into. But Word, in its inimitable way, insists upon dragging the formatting that came with the text, and that frequently screws up my document. I find myself constantly hitting the Undo icon up on the Toolbar, then clicking Edit > Paste Special, choosing Unformatted Text, and clicking OK.

I could switch to Office XP, of course. A little Smart Tag comes up on the screen every time you paste text into a Word 2002 document. Changing the formatting of the text is as simple as taking my fingers off the keyboard, grabbing the mouse, locating the Smart Tag, clicking it, and choosing not to accept the formatting.

Like so many annoying parts of Office, a little macro can solve this idiosyncrasy. Start Word and bring up Visual Basic for Applications (VBA) by clicking Tools > Macro > Macros. Type a good macro name in the box, say, PasteUnformatted, and click Create.

Unless somebody (or something) has your Normal template locked away, VBA comes to life and writes a little program for you that looks something like this:


Sub PasteUnformatted()
'
' PasteUnformatted Macro
' Macro created 10/18/2001 by Phineas T. Farquahrt
'

End Sub

Immediately before that End Sub line, all you need to do is type one short, sweet line of VBA code. When you're done, the macro should look like this:


Sub PasteUnformatted()
'
' PasteUnformatted Macro
' Macro created 10/18/2001 by Phineas T. Farquahrt
'
Selection.PasteSpecial DataType:=wdPasteText
End Sub

Click File > Close and return to Microsoft Word.

Now, you need to tell Word to run that macro every time you press Ctrl-V; that's easy, too.

                     Click Tools > Customize.

                     Make sure Save In shows normal.dot among the file types and click the Keyboard button.

                     In the Categories box, pick Macros.

                     In the Macros box, choose your macro (in this case, PasteUnformatted).

                     Click inside the "Press new shortcut key" box and hit Ctrl-V.

                     Click Assign.

You're done! From now on, every time you press Ctrl-V, you can paste the contents of the clipboard into Word, Excel, and Outlook without any formatting.