Hi,
I like to convert a PowerPoint presentation into Microsoft Word Document using the AppleScript.
I can do it manually by selecting the sub menu option “Microsoft Word” of “Send To” sub menu of “File” menu.
Can any one help me to do this by mens of AppleScript to convert the PowerPoint presentation into word doc.
I am unable to use the system events option also as attached in the below script.
tell application "System Events"
tell process "PowerPoint"
click menu item "Microsoft Word" of menu 1 of menu item "Send To" of menu 1 of menu bar item "File" of menu bar 1
end tell
end tell
Regards
Mani
Hi manikandan,
You need to activate PowerPoint first, as you can only sucessfully script the GUI of an application, if it is the frontmost program:
tell application "Microsoft PowerPoint"
activate
end tell
tell application "System Events"
tell process "PowerPoint"
click menu item "Microsoft Word" of menu 1 of menu item "Send To" of menu 1 of menu bar item "File" of menu bar 1
end tell
end tell
Or you use RTF as export format instead.
Thus you can do the job with few lines of AppleScript without clicking GUI elements:
tell application "Microsoft PowerPoint"
set savePath to (path to desktop as text) & "TestPresentation.rtf"
save presentation 1 in savePath as save as RTF
end tell
Ciao
Farid