I believe one of the most frequent functions used in Ms Word by the users is Copy and Paste. Why people love this function s much because it is extremely useful to save our time and energy. But to me, rather than pasting a text with the format (e.g. font type, size and color) I would prefer to have the plain text because usually I already have my custom format that different from the source text so I don’t want the source format overwrites my specified format in the target location. So whenever possible I avoid using the paste shortcut (Ctrl+V), instead to use the menu Edit –> Paste Special –> Unformatted Text. Although it is not practical, but it is less effort than fixing the text format if I use the regular paste shortcut.
Recently I had an idea to create a macro by recording the menu Edit –> Paste Special –> Unformatted Text steps and then assigned the macro to a shortcut key.
Here are the steps that you want to follow:
- Run the menu Tools –> Macro –> Record New Macro.
- In the Record Macro dialog box:
- Give the macro name as PasteUnformatted.
- Assign the macro to Keyboard because later we want the macro runs based on a shortcut key.
- Ensure the store is stored in the Normal.dot file because we want it to be accessible in all documents.
Click OK to continue.
- In the next dialog window, assign the shortcut key. In my example I use Ctrl+1 because this key is not used by any menu in Ms Word. We are free to use other key so long it has not been used by the other menu/macro.
Click Assign and then click Close to start recording.
- While the macro is recording, run the menu Edit –> Paste Special –> Unformatted Text, and then stop the macro.
Creating the macro is done. Quite easy, isn’t it?
Now we want to test the macro.
- Create a few sample texts and then set the font style (e.g. bold, italic, underline), enlarge the font size, give color, so forth. Now select and copy the texts.
- Open a new Ms Word document and do the Ctrl+1. What do you see?
- The texts pasted along with the format! It doesn’t paste the plain text as we expect.
It seems Ms Word does not always record the macro exactly what we want so we need to fix the macro program manually.
- Open the Tools –> Macro –> Macros menu. In the Macro dialog box, select the PasteUnformatted macro and click Edit.
- It brings you to the Microsoft Visual Basic editor. Place a single apostrophe character in the beginning of the existing command line as a remark sign so this line will not be executed.
Add these two lines to replace the original code.
On Error Resume Next
- Save and close the editor.
Try again the test, this time it should work as expected.
Congratulation, now the “Paste Special Unformatted Text” shortcut works fine!