Tuesday, December 18, 2007

Indispensable Paste Special Macro

Just can't do without it. I use it at least 10 to 15 times a day. Maybe more. Use it when I am translating a document in MS Word and picking up terms from various sources.

You find the translation of a term in an online dictionary, or in a Powerpoint file. You copy it (Ctrl + C) and wish to paste it (Ctrl + V) into the document you are translating in MS Word. You do so and find that the pasted text is in a format quite different from the format of the surrounding text. You have to select the offending text and change its font, the font size and sometimes the color. Uggh!

Copy this macro to your list of macros. I generally go to Tools/Macro/Macro and type PasteSpecial (the name of the macro), click Edit, and copy the macro so that there's only one "Sub" and one "End Sub." Save the macro, then place it on the menu bar at the top by: Alt + T(ools) + C(ustomize); click on Commands/Macros, scroll down until you find Normal.NewMacros.PasteSpecial and drag it right up to the top of the screen adjacent to the Help menu and drop it there. Don't close the Customize window. Right click on the item you have just deposited on the top of the screen, delete "Normal.NewMacros" from the longish phrase, and insert "&" in front of the "l" of Paste Special. Close the Customize window. That’s it. Now all you need to do to paste a glossary term into your text in Word is hit Alt + L instead of Ctrl + V. The text will be pasted in the same format as the surrounding text.

Sub PasteSpecial()

' PasteSpecial Macro

' Macro created 2006/11/18 by Gururaj Rao

Selection.PasteSpecial DataType:=wdPasteText

End Sub


Anonymous said...

Hi Guru,

how've you been? Thanks for starting this blog.

Regarding the "Paste Special" macro, here's a free utility called PureText that does the same, and not only in Word but for every Windows program. I use it a lot and feel like (virtually) embracing the author every time I do:



Wolfgang Bechstein

Gururaj Rao said...

Thanks for the info on Puretext - weighs in at a very small 13 kb too. Excellent!
Your inputs (comments/ suggestions) to this blog henceforth also will be gratefully accepted and appreciated.

Gururaj Rao said...

Additional note on Wolfgang's find:
The macro that I posted (Paste Special) works only in Word. If you wish to copy pure text into an application such as Powerpoint or Excel, or some other Windows application, then Puretext would be a lifesaver. It is also very small, and you can assign any hotkey you like, and make it reside in your QuickLaunch bar.

MMM said...

I saw your message to JAT members. Thank you for your kindness in sharing the macros, Gururaj. Very helpful! I have used Ryan's great macro before SDLX work for years, and your macros will be indispensable to me. Speaking of pasting tips, here's a minor and probably obvious tip when using Excel with SDLX if cells with text not for translation are between cells for translation. (This method is still tedious, but maybe not as tedious as the alternative.) 1) Paste the group of cells, including non-translatable cells, into a new Excel file. 2) Clear (but do not delete) the cells not for translation. 3) After translating this file, when pasting translation from the modified Excel file back into the source Excel file, select Paste Special. Select Values and the Skip blanks (空白セルを無視する) check box before clicking OK. The translation will be applied leaving the existing cells between them intact.

Gururaj Rao said...


Very nice tip -- very useful when you have untranslatable text in an Excel file. Thanks for posting it here.

Look forward to your posts henceforth also.

Gururaj Rao