Thursday, November 12, 2009

Image files to PowerPoint slides Automatically

Imagine that you (a Mac user, of course) have a bunch of image files (say, screenshots) that you need to get into a PowerPoint presentation. How do you do it? Well, in PowerPoint you would create a new slide, go under Insert menu, pick "Picture…", in the subsequent dialog box navigate to where your image files are, pick one, hit "Insert" and then repeat the process as many times are there images to include. The question is - aren't computers supposed to make your life easier??? I encounter this scenario quite frequently, and so I figured that investing a bit of time into trying to figure out how to do this right was worth it. The solution is based on Apple Automator and uses Snow Leopard revamped Services (if you are not using Snow Leopard, this is still imminently doable with Automator). Here we go.

Launch Automator and choose "Service" on initial prompt
Set the selectors in the upper right gray bar as shown on below
Find the poorly named but highly useful "Create PowerPoint Picture Slide Shows" action and drag it in:
File > Save
I named my service "Add to PowerPoint Presentation"
You're done!

To test, select some image files in Finder, then go Finder > Services > Add to PowerPoint Presentation. Viola!

Next time you find yourself with a heap of images that need to go into PowerPoint (or any other repetitive kind of task), right when your mind starts to get numb just imagining what you are about to start doing, ask yourself - won't it be better to have my computer do this for me? Then take a little time, figure out a cool solution, and write about it so I can find it!

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!