extract email address from Excel cell and send to entourage as PDF

Good evening y’all!

Im trying to adapt the Automator “send pdf version to entourage” workflow that comes packaged with Excel. I want it to extract information and use it in the various fields in the workflow. Primarrly I’d like to extract an email address from a known cell and use it as the ‘to’ field in the resulting email. Similarly I’d like to pull details and use them in the save as commands.

I would have posted this in the Automator forum but its down at the moment - - besides I believe that I’ll have to use applescript to get these vallues in the frist place.

Anyone ever wrestled with this kind of thing? I assume the applescript part would be something like:

if (get value of range "D42") is not "" then (get value of range "D42") as text 

beyond this, Im not sure how to get those values into the fields of the various stages of the workflow.

many thanks in advance for your experience.

what a learning process!

I was finally able to pack a cell into variable as so:
add a “run applescript step”:
run the following

on run {input, parameters}
	tell application "Microsoft Excel"
		copy value of cell "E7" to input
	end tell
	return input
end run

then take the output of this and pack it into a ‘Set Value of Variable’ step naming your variable something distinct.

Once you’ve done this you can in turn paste these variables ANYWHERE in the workflow by using the hack listed here:

good luck!