Fixed Entourage 'Expected Reference'

I finally managed to figure out the error on the entourage script - the initial ‘tell application’ needed to be changed to just ‘tell application "devonthink pro’ - after that change, the mail gets into the global inbox with no error!

i have pasted the working script for me below…

NOW - could anyone from Devonthink add the code that would bring up a window to choose the database/group folder for destination- the black transparent window seen in other scripts? that would then make this script awesome!


property pNoSubjectString : “(no subject)”

tell application “Microsoft Entourage”
set validSelection to false
set theSelection to the selection

		if (theSelection is not {}) and (class of theSelection is not folder) then set validSelection to true
	end try
	if not validSelection then error "One or more messages must be selected."
	tell application "DEVONthink Pro"
		if not (exists current database) then error "No database is in use."
	end tell
	repeat with theMessage in theSelection
			set theSubject to subject of theMessage
			set theSender to (address of sender of theMessage) as string
			set theSource to source of theMessage
			set theDateReceived to time received of theMessage
			set theDateSent to time sent of theMessage
			if theSubject is equal to "" then set theSubject to pNoSubjectString
			tell application id "com.devon-technologies.thinkpro2" to create record with {name:theSubject & ".eml", type:unknown, creation date:theDateSent, modification date:theDateReceived, URL:theSender, source:(theSource as string)} in incoming group
		end try
	end repeat
on error error_message number error_number
	if the error_number is not -128 then display alert "Entourage" message error_message as warning
end try

end tell

Which version of Microsoft Entourage do you use? 2004 or 2008? The scripts seem to work over here using 2008 and simply recompiling them using the Script Editor.

it is the current 2008 - perhaps it is the recompiling that works…