Tuesday, November 10, 2009

Paste unformatted text in Word 2008 for Mac via keyboard shortcut

I often need to paste text into Word 2008 for Mac but frequently need to make sure the formatting does not clash with existing document. The only way Word lets you do it is to go Edit > Paste Special… then manually select Unformatted Text and hit OK. Way, way too many steps and keyboard/mouse switches for a simple and frequently used action. Ideally I want to accomplish this with a keyboard shortcut. Older versions of MS Office for Mac supported VB scripting, and there was an easy native solution; as you know, Office 2008 dropped that support. So people who know turned to Apple Script. And I turned to Google to find those people… The solution:

In AppleScript Editor, open a new document and paste this in:

try
set theClip to Unicode text of (the clipboard as record)
tell application 'Microsoft Word' to tell selection to type text text theClip
end try

Save as Script; name it "Paste Plain Text\omV.scpt" and place it into ~/Documents/Microsoft User Data/Word Script Menu Items

Now, when you need to paste unformatted text, hit Option+Command+V and - viola! - magic happens.

Enjoy!

No comments: