Word macro makes "paste special" easy
It is not unusual for lawyers and law firm staff to compile new documents from bits and pieces of existing documents or even web pages (such as quoting text from web pages, etc.). The problem with doing this in MS Word is that the standard Copy and Paste commands bring the formatting of the original document along with the text.
Savvy users know that the Paste Special option allows them to strip the formatting and paste plain text into the document. The added plain text will adopt the formatting of the target document, avoiding the need to go back and clean-up formatting inconsistencies.
If you've tried to write a macro to automate the process of pasting plain or unformatted text into a Word document, you know that Word 2003 changes your macro to the standard Paste Default command and brings in the old formatting anyway. This can be fixed by editing the finished macro to specify that plain text be used instead.
Here are the steps:
- Open a MS Word document, select some text, and press Control-C to copy it
- On the Word toolbar, click Tools>Macro>Record New Macro
- In the Macros dialog box, type PastePlain
- Click the Keyboard button to open the Customize Keyboard dialog box
- Verify that the Save destination in the drop-down list is your Normal.dot template (it should be by default)
- Click in the Press new shortcut key box and type Control-V (or any other key combination, but this will substitute Paste Plain Text for the standard Paste command, which is what you will want most of the time)
- Click the Assign button, then the Close button
- When the small cassette-like icon appears on screen, go to the Word toolbar and select Edit>Paste Special and double-click on the Unformatted Text option
- Click the square stop recording button on the cassette icon to finish recording your macro
Unfortunately, Word has translated these steps into the following macro command:
Selection.PasteAndFormat (wdPasteDefault)
This command will simply paste formatted text like the standard Paste command. You need to select Tools>Macro>Macros from the Word toolbar. Find and select your PastePlain macro in the list. Click the Edit button. Just change "wdPasteDefault" to "wdFormatPlainText". Then press Alt-Q to save the changes and exit the macro editor. Now your PastePlain macro should work properly whenever you hit Alt-V. On the rare occasions when you want to preserve the original formatting of the copied text, just use the standard Paste command in Word's Edit toolbar.
Comments