View Single Post
This script is working for me, most of this was gathered from other threads, unfortunately I have misplaced the original creators names to give credit.

tell application "Microsoft Entourage"
	-- get the currently selected message or messages
	set selectedMessages to current messages
	-- if there are no messages selected, warn the user and then quit
	if selectedMessages is {} then
		display dialog "Please select one or more messages first and then run this script." with icon 1
	end if
	repeat with theMessage in selectedMessages
		set theName to subject of theMessage
		set theContent to content of theMessage
		set theID to ID of theMessage as string
		-- set the path to a temp area on your HD to temporarily store the attachment to be loaded into OF
		set theFileName to "YourHDName:Users:Username:Temp:" & theID & ".eml"
		save theMessage in theFileName
		tell application "OmniFocus"
			set theDoc to default document
			set theTask to theName
			set theNote to theContent
			tell quick entry
				set NewTask to make new inbox task with properties {name:theTask, note:theContent}
				tell the note of NewTask
					make new file attachment with properties {file name:theFileName, embedded:true}
				end tell
			end tell
		end tell
		-- Remove the file now that it is in OF
		tell application "Finder"
			delete file theFileName
		end tell
		-- Only Uncomment if you really understand and are happy with the process and want the message to 
		-- be removed from Entourage after it gets sent to OF
		-- delete theMessage		
	end repeat
end tell