The Omni Group
These forums are now read-only. Please visit our new forums to participate in discussion. A new account will be required to post in the new forums. For more info on the switch, see this post. Thank you!

Go Back   The Omni Group Forums > OmniFocus > OmniFocus Extras
FAQ Members List Calendar Search Today's Posts Mark Forums Read

latest, greatest Entourage to Omnifocus Thread Tools Search this Thread Display Modes
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
Thanks a lot. I'll try it. As I read it, I see that if the embedded property is set to false, then the file will stay in its original location without copying it to the database (keeping the database leaner). Thanks again (to you and all original the creators).
I have changed the script slightly and put installation instructions around it. Find it at

hope you like it
I have two tweaks I wanted to rburgst's current script. I have solved 1 so far:

1 (solved) I wanted to include ONLY a link to the original email into the notes field in omnifocus, and not the body of the email. I sync to the iphone so I want to keep sync times down. I edited this line:

set NewTask to make new inbox task with properties {name:theTask, note:theContent}

and changed it to this:
set NewTask to make new inbox task with properties {name:theTask, note:" "}

Which works well.

2. (unsolved). I want the email link in Omnifocusto open in Entourage. Another post suggested changing the preferences in to set Entourage as primary, but this does not fix the issue. It opens the email in regardless. Any ideas? Thanks!
Perhaps if you select one of the linked .eml files in the Finder, do Get Info and set the application to open it with to Entourage (checking the "use this app to open all such files" box) you'll get the result you want.
Thanks for the recommendation, but all my .eml files open with Entourage in the finder (and spotlight) already. It is just when opened within Omnifocus that launches.

I even double checked a specific eml file that has been added to Omnifocus with this script- in the finder it launches Entourage, Omnifocus still

Indeed. Have you tried clearing the Launch Services caches and so on?
Upon further review of Omnifocus preferences, I'm guessing the issue may be that Omnifocus is hard wired to because of its clipping service integration? I can't think of any other reason why Omnifocus would ignore the finder's type settings.
Yeah, maybe, except it can open everything else under the sun, right? Why have a special check in that code path when you're going to hand everything else off to launch services?

I tried making a link to a .emlx file and following it from OF after setting TextEdit as the default application to open such files. It opened in TextEdit, as I would expect. This was with 10.4.11.
OK, getting closer. I just tried dragging an eml file into Omnifocus (rather than using the script) and indeed it opens in Entourage. So the script must be the culprit? Changing the file association somehow? I'm off to investigate...

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Similar Threads
Thread Thread Starter Forum Replies Last Post
Script to add delegated tasks from entourage to "Waiting" context in OmniFocus tarun101 OmniFocus Extras 1 2010-05-21 09:09 AM
Make it all work between Entourage 2008 and Omnifocus? berntm Applying OmniFocus 1 2009-12-10 08:06 AM
The greatest widget philonous OmniDictionary 4 2008-11-24 03:13 AM
More Entourage to OmniFocus applescripts: this time it's tasks and notes spnyc OmniFocus 1 for Mac 0 2007-06-24 10:10 AM

All times are GMT -8. The time now is 03:02 PM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.