Macro to paste unformatted text in Word 2007

G

Guest

From a post for Word 2000 modified to reflect changes in Word 2007
(Orig. source: http://office.microsoft.com/en-us/help/HA010429611033.aspx)

To create a macro to cut and paste without formatting
1. Start Word.
2. On the View tab, click Macros, and then click View Macros to display the
Macros dialog.
3. In the Macro name box, type PasteUnformattedText.
4. Make sure that All active templates and documents is displayed in the
Macros in list, and then click Create. The Microsoft Visual Basic® Editor is
displayed.
Note If you need to learn about the Visual Basic Editor, see the Power
User Corner column Managing Macros with the Visual Basic Editor.
5. Directly above the End Sub statement in the PasteUnformattedText
subroutine, type the following line of code:
6. Selection.PasteSpecial DataType:=wdPasteText
7. On the File menu, click Close and Return to Microsoft Word.
Now you need to instruct Word to run the PasteUnformattedText macro each
time you press the CTRL+V keyboard shortcut.

To run the macro each time you press CTRL+V
1. Click the Office Button.
2. Click Word Options at the bottom of the dialog box.
3. Click Customize in the left nav bar.
4. At the bottom of the dialog box, click the Customize button to the right
of Keyboard shortcuts:
5. Make sure the Save changes in box displays Normal.dotm.
6. In the Categories list, click Macros.
7. In the Macros list, click PasteUnformattedText.
8. Click in the Press new shortcut key box, press and hold the CTRL key,
and then press and hold the V key at the same time. The Press new shortcut
key box displays Ctrl+V.
9. Click Assign. Click Close and then click Close again.

That's it! Now, every time you press CTRL+V, Word pastes text from the
Clipboard without the formatting. If you ever want to return the CTRL+V
keyboard shortcut to its default behavior, it's very easy to do.

To return the CTRL+V shortcut to its default behavior
1. Click the Office Button.
2. Click Word Options at the bottom of the dialog box.
3. Click Customize in the left nav bar.
4. At the bottom of the dialog box, click the Customize button to the right
of Keyboard shortcuts:
5. Make sure the Save changes in box displays Normal.dotm.
6. In the Categories list, click Macros.
7. In the Macros list, click PasteUnformattedText.
8. In the Current keys box, click Ctrl+V and then click Remove.
9. Click Close, and then click Close again.

The CTRL+V keyboard shortcut now pastes text and any formatting from the
Clipboard by default. However, the PasteUnformattedText macro is still
available if you ever want to use it again.
 
G

Guest

KristinQ,

This is excellent! Lucky for me for looking this up after you posted it.
This filled in the missing links in my mind after reading the Rado piece.
Thanks.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top