Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Click here to return to the 'Convert iWork '09 files to Office or PDF files via droplets' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Convert iWork '09 files to Office or PDF files via droplets
Authored by: ssawyer on Feb 10, '10 10:48:07AM
If you don't already know a good bit about this, I wouldn't bother, since you'd have to modify the scripts given anyway, and if you do it wrong, you could seriously screw up Keynote. I mentioned it mainly as a technical curiosity for people working with scripting the iWork suite.

But here are the particulars:

  1. Locate in Finder. Right- or control-click and choose "Show package contents"
  2. Open the Contents folder that shows. Then open the Info.plist file in Property List Editor.
  3. Drill down into the "Document Types".
  4. Under "Item 0" (BGDocumentTypeShow), add a child item named "Exportable As Document Type Names" to the bottom of its property list.
  5. Within that new child item, add an "Item 0" with the value "Microsoft PowerPoint 97 - 2004 presentation"
  6. Repeat the above 2 steps in Item 1 (BGDocumentTypeSingleFileShow).
Do all of the above without having Keynote open.

You'll then need to revise the scripts I included. In the iWork to Office script, you'll need to replace everything inside the else if (theExtension is equal to "key") then block with the following:

	set docPathAndName to docPathAndName & ".ppt"
	tell application "Keynote"
		-- check if document is already open
		set targetDocument to null
		repeat with aDoc in slideshows
			if (name of aDoc) is equal to theOriginalName then set targetDocument to aDoc
		end repeat

		-- if not, open it
		if targetDocument is null then
			open aFile
			set fileOpened to true
			set targetDocument to front slideshow
			set fileOpened to false
		end if
		-- convert it
		save targetDocument as "Microsoft PowerPoint 97 - 2004 presentation" in docPathAndName
		-- close it if necessary
		if fileOpened then close targetDocument saving no
	end tell

Hope that helps, but use at your own risk.

[ Reply to This | # ]