Isn't it a way to set the content of the target item with an instruction like : set contents of the target item to theDatas ?
That's what I was thinking. Here's the handler I use to make a new message in outlook.
The addresses are lists of text. {"email@hidden"} This could easily be modified to accomodate lists of lists {"Person's Name", email@hidden"}
The subject is one line of text, the body is text.
If it's an existing outgoing message window as opposed to a new message, this can be adapted for that as well.
on SendMessage(toAddresses,
ccAddresses, bccAddresses,
messageSubject, messageBody)
set AppleScript's text item delimiters
to ", "
tell
application "Microsoft Outlook"
set
the newMessage
to (make new
outgoing message with properties {content:messageBody,
subject:messageSubject})
repeat
with thisAddressee in toAddresses
make
new recipient
at newMessage
with properties {email address:{name:"",
address:thisAddressee}}
end
repeat
repeat
with thisAddressee in ccAddresses
make
new cc recipient
at newMessage
with properties {email address:{name:"",
address:thisAddressee}}
end
repeat
repeat
with thisAddressee in bccAddresses
make
new bcc recipient
at newMessage
with properties {email address:{name:"",
address:thisAddressee}}
end
repeat
set
thisMessage to open
newMessage
activate
end
tell
end SendMessage