Scripting an email in Microsoft Outlook

Hi, I’m having trouble with what should be rather staightforward. I’m running Outlook in Classic, and want to create an email with the name of the selected file in the Finder as the subject, thusly:

tell application "Finder"
	set theSelection to selection
	set myName to (name of item 1 of theSelection as string)
	tell application "Microsoft Outlook"
		activate
		CreateMail Subject myName
	end tell
end tell

Ignoring the usual complaints from Outlook about missing parameters, this works fine if you sustitute an actual string (e.g.: set myName to “Hello”). I’ve tried “as text” and “as unicode text” with no improvement.

Any ideas?
:frowning:

I should mention that the error returned by Outlook is “Some data is the wrong type”.

Vic

Okay, I finally came up with a workaround for this issue. If anybody cares, send me an email and I’ll try to explain it.

Vic