Using the current topic to start an email

Roland Küffner newsletter at rolandkueffner.de
Wed Apr 11 06:48:40 PDT 2007


Hi George,

here is some basic code for your task. Please note that automatic  
creation of attachments from URLs has to be turned off in the  
preferences or this will yield an error (I had some workaround for  
this but I can't find it right now). This is a rather quick and dirty  
bunch of code. It would be nice if you could share better solutions  
you come up with.

happy coding
Roland




tell application "OmniOutliner Professional"
	tell front document
		set theRows to selected rows
		repeat with aRow in theRows
			set theSubject to topic of aRow
			set theText to the note of aRow
			-- the next row assumes that you have a column named "email" in  
your document
			set theAddress to value of cell "email" of aRow
			display dialog theAddress
		end repeat
	end tell
end tell

tell application "Mail"
	set newMessage to make new outgoing message with properties  
{subject:theSubject, content:theText & return & return}
	tell newMessage
		-- your sender address here:
		set sender to "from at me.net"
		make new to recipient at end of to recipients with properties  
{address:theAddress}
	end tell
	send newMessage
end tell





Am 11.04.2007 um 13:46 schrieb George Crump:

> All,
>
> I am attempting to write a script for OmniOutliner that would take  
> the currently selected row a start an email message that would use  
> the Topic as the subject line and the notes as the body. I also  
> have a column called Assigned that I would like to use to but into  
> the TO field for the email address. Can someone get me started?
>
> George
>
> _______________________________________________
> OmniOutliner-Users mailing list
> OmniOutliner-Users at omnigroup.com
> http://www.omnigroup.com/mailman/listinfo/omnioutliner-users



More information about the OmniOutliner-Users mailing list