Thanks but I want to include formatting the text and including images in line with the content. I want to do something like the following but include images and open it in word or pages
-- Make sure a presentation is opened in Keynote. If not, notify the user and stop.
tell application "Keynote"
if (front document exists) = false then
display alert "Unable to proceed." message "Please open a presentation in Keynote."
return
end if
set extractBody to button returned of (display alert "Would you like to extract slide content too?" buttons {"Yes", "No"}) = "Yes"
-- Target the front presentation.
tell front document
-- Get the name of the presentation.
set thePresentationName to name
-- Retrieve the titles of all slides.
set theTitles to object text of default title item of every slide
-- If specified, retrieve the body text of all slides
if extractBody = true then
set theBodyText to object text of default body item of every slide
end if
-- Retrieve the presenter notes for all slides.
set theNotes to presenter notes of every slide
end tell
end tell
-- Prepare the notes as HTML.
set theFormattedNotes to "<html><body><h1>" & "" & thePresentationName & "</h1>" & return
repeat with a from 1 to length of theTitles
set theFormattedNotes to theFormattedNotes & "<h3>Slide #" & a & "</h3>" & return
set theFormattedNotes to theFormattedNotes & "<b>" & itema of theTitles & "</b>" & return & return
if extractBody = true then
set theFormattedNotes to theFormattedNotes & "<b>•</b>" & itema of theBodyText & return & return
end if
set theFormattedNotes to theFormattedNotes & "<b>Presenter Notes:</b> " & item a of theNotes & return & return
end repeat
set theFormattedNotes to theFormattedNotes & "</body></html>"
-- Replace any returns with line breaks.
set AppleScript'stext item delimiters to {return, ASCII character 10}
set theFormattedNotes to text items of theFormattedNotes
set AppleScript'stext item delimiters to "<br>"
set theFormattedNotes to theFormattedNotes as string
set AppleScript'stext item delimiters to ""
-- Create the note in Evernote.
tell application "Evernote"
activate
set theNote to create notenotebook "Inbox" titlethePresentationNamewith htmltheFormattedNotes
open note windowwiththeNote
end tell