All kinds of situations call for pasting text into a document without bringing the formatting with it — like when you copy something from a Web site and don't want to insert a bunch of table cells and oddball font sizes. One way to leave formatting behind is to use Word's Show Paste Options feature, which offers the Match Destination Formatting command. Unfortunately, the feature is a little cumbersome to use, and earlier versions of Word don't include it.
The Paste Special command offers another choice, but it's not terribly efficient either. Users have traditionally appreciated this alternative: a one-line macro that automatically pastes text without formatting, along with a button or keyboard shortcut that makes the process instantaneous.
- Choose Tools | Macro | Macros. Type a name (e.g., NoFormatPaste) in the Macro Name text box and click Create to open the VB editor. Enter Selection.PasteSpecial DataType:=wdPasteText, as shown in Figure A, and choose File | Close And Return To Microsoft Word.
- To create a shortcut to run the macro, choose Tools | Customize, click the Commands tab, and click Keyboards. Choose Macros from the bottom of the Categories list and select the macro from the Commands list box. Enter the desired combo in the Press New Shortcut Key text box, as shown in Figure B. (Check the Currently Assigned To field to make sure the shortcut's not already in use.) Click Close twice.
- To create a button to run the macro, choose Tools | Customize and click the Commands tab. Choose Macros from the Categories list, select the macro from the Commands list, and drag it to the toolbar where you want the button to appear (Figure C).
- To shorten the name, right-click on the macro to display a shortcut menu. You can then edit the name in the Name text box. Click Close in the Customize dialog box. Your toolbar will now include the new button, as shown in Figure D.
In Word 2007, the process is similar — but different enough to warrant its own instructions:
- Click the Developer tab on the Ribbon. (If you don't have a Developer tab, you'll need to choose Word Options from the Office menu and select the Show Developer Tab In The Ribbon option.)
- Click the Macros button in the Code group (left end of the Ribbon), and Word will open the familiar Macros dialog box. You can proceed as described above to create the macro.
- To create the keyboard shortcut, choose Word Options from the Office menu and click Customize in the left pane. Click the Customize button at the bottom of the screen to open the Customize Keyboard dialog box. As with earlier versions, choose Macros from the Categories list, select your macro from the Commands list box, type your shortcut in the Press New Shortcut Key text box, and then click Assign and Close.
- To create a button to run the macro, choose Word Options from the Office menu and click Customize in the left pane. Select Macros from the Choose Commands From drop-down list. Then, select NoFormatPaste from the list of macros and click Add. Word will add the macro to the list box on the right, as shown in Figure E.
- Click Modify to open the Modify Button dialog box, where you can select an icon if you want and edit the text in the Display Name text box. When you finish, click OK to add the button to your Quick Access Toolbar, as we've done in Figure F.