Converting Keynote Files to Powerpoint without Formatting Problems.

keynote-icon-100066137-largeI’m a little bit of a slide design geek.  I actually love the process of crafting slides, and since I get to preach/speak regularly, it’s something I’ve spent a fair amount of time doing.  My favorite tool for doing this is Apple’s Keynote.  It’s presentation software with a design-centric user interface—making it much easier and more pleasant to work with than the mac version of Powerpoint. It puts thing like transparency, adding shapes, text, changing layers, and all of those sorts of things at forefront of the interface, while powerpoint seems determined to bury them beneath layers of menus and options that I never use.

The problem, of course, is that I’m often creating the slide deck on my machine, and then running them on a different one…a PC that can only use .ppt files.  So every week I have to come up with a powerpoint version of the slide deck I’ve created. And if I just export the keynote file straight into .ppt, I’m asking for all kinds of problems. For instance, I’ll be limiting my font choices, because I can then only use fonts that I know are on the other computer.  If I don’t limit them, then invariably the font will simply be rendered by a stock font like Ariel or Calibri. Even beyond the forced font-ugliness, this causes a cascade of format and design issues—the sizing of the fonts will get out of whack, and the spacing of the characters on the page will go nuts.  This is amplified by the fact that I use huge fonts sizes, which you should always do in presentations. That little bit of character spacing or line-height difference gets nasty when you’re looking at a 120-200 font. Over time, I’ve come up with a workflow that pretty dependably manages the.keynote -> .ppt conversion process, and minimizes formatting problems.  It works by flattening out the slides’  layers into images, and making a new slideshow from the image files. Here’s the process:

  1. Design the slides in Keynote.
  2. Export the file to .jpg by choosing File -> Export To ->Images. (I save this on my desktop)
  3. Create a new Keynote File.
  4. Drag the images created in step 2 into the slide navigator (left column of thumbnails) on the new file. (You can drag them all at once.) This creates a slide for each image where the top layer is the image. Assuming the size of the slides in this presentation are the same size as the one in step 1, what you now have is a new presentation mirroring your first one, except that now the fonts are flattened into the image!
  5. Convert the file to ppt by selecting File -> Export To -> PowerPoint.  Save it where you want it.
  6. Delete the folder (on my desktop) where I create the image files.

So this is all well and good, and if you’re content with a foolproof six step method, read no further. However, I’ve had a nagging suspicion that I could script a way to do this in one step, and I finally got some help in making it work.  So here are some one-time steps to setting it up on your mac…after you do these, you’ll be able to use it with one click from now on.

  1. Open the Applescript Editor on your mac.  (You can just find it with spotlight.)
  2. Create a new document.
  3. Paste the following into the new document:
    set v to ("Volumes" as POSIX file) as alias
    tell application "Finder" to set f to (make new folder) as text -- create a temp folder to export images
    tell application "Keynote"
        tell front document
            export to (file f) as slide images with properties {image format:JPEG, compression factor:95}
            set {h, w, tName} to {height, width, name of it}
        end tell
        tell tName to if it ends with ".key" then
            set newName to (text 1 thru -5) & ".ppt"
            set newName to it & ".ppt"
        end if
        set jpegs to my getImages(f)
        set newFile to choose file name default name newName default location v with prompt "Select the folder to save the PPT file"
        set newDoc to make new document with properties {width:w, height:h}
        tell newDoc
            set mSlide to last master slide -- blank
            repeat with thisJPEG in jpegs
                set s to make new slide with properties {base slide:mSlide}
                tell s to make new image with properties {file:thisJPEG}
            end repeat
            delete slide 1
            export to (newFile) as Microsoft PowerPoint
            close saving no
        end tell
    end tell
    tell application "Finder" to delete folder f -- delete the temp folder
    on getImages(f)
        tell application "Finder" to return (files of folder f) as alias list
    end getImages
  4. Save this file into your Scripts Folder. (thats ~/Library/Scripts. Make sure it’s the Library folder for your username.) Call it what you want.
  5. Open Script Editor preferences. Check the box “Show Script Menu in Menu bar”
  6. You should now be able to see a scroll-looking icon in your menu bar. If you select it, you may already see the script you just made listed.  If not, take the “Open Scripts Folder” menu item, and choose “Open User Scripts Folder”. If you run the script here (with a keynote file open), it’ll work through its sequence, ad next time you take the menu item, it’ll be listed below.

Okay, whew.  You made it.  Now, next time you have a keynote file open that you want to convert to a powerpoint file comprised of flattened images, with no format issues, all you have to do is select the scripts menu item, and run the script. Choose where you want the new file.  Voilà.

Now that’s a pretty sweet hack.

(Note: This will not preserve any transitions from Keynote, only the final visual appearance of each slide. If your original slide has staged build in it, you probably just need to go the manual route outlined above!)