Ich möchte eine Nachricht, die im Ordner „Entwürfe“ gespeichert ist, als Vorlage für andere Nachrichten verwenden. Leider habe ich nicht die richtige Syntax:
tell application "Microsoft Outlook"
-- locate the message
set theMessage to the first message in mail folder drafts <== error: 'Can't make mail folder id 107 into type integer'
-- show subject (testing)
display dialog of the subject of theMessage
-- for each contact with category 'foo'
-- copy message
-- add sender
-- add first name to message's body
-- set delivery date to 5 minutes in the future
-- send message
-- end loop
end tell
Was vermisse ich?
Der korrigierte Code:
-- locate the message
set theMessage to the first message in drafts
-- show subject (testing)
display dialog of the (subject of theMessage as text)