Applying a theme to PowerPoint

I would like to apply a theme I have created to a PPT presentation.

The following script runs, but afterwards the presentation is unchanged.

Suggestions?

set thePresentation to “/Users/freejak/Desktop/combined-presentation.pptx”
set theTheme to “/Users/freejak/stirling-blue-and-yellow-theme.thmx”
tell application “Microsoft PowerPoint”
activate
open thePresentation
apply theme active presentation file name theTheme
save active presentation
close active presentation
end tell
tell application “Microsoft PowerPoint”
quit
end tell

Model: Macbook Air
AppleScript: 2.2.4
Browser: Firefox 23.0
Operating System: Mac OS X (10.8)

Did not test this, but you might want to try something like this in your code:


tell application "Microsoft PowerPoint"
	activate
	set thePresentation to the name of the active presentation
	tell presentation thePresentation
		apply theme theTheme
	end tell
end tell

Thank you haolesurferdude, but this does not run.

The line “apply theme theTheme” errors with the message:

Microsoft PowerPoint got an error: “/Users/freejak/stirling-blue-and-yellow-theme.thmx” doesn’t understand the apply theme message.

Jack