On 02-06-01 4:44 AM, "pedro" <[EMAIL PROTECTED]> wrote:
> G'day Folks
>
> I've just started using Entourage as a result of being called upon to
write
> some AppleScripts to send emails via Entourage from FileMaker Pro
databases.
> I admit to still running trainer wheels with AppleScript but I've managed
> all I've need to do this far.
>
> What I need to do is to create a new message with the addresses [to &
bcc],
> subject and possibly message body supplied by FileMaker. I can get data
out
> of FileMaker without problems so my focus here is getting the data into
> Entourage. I've tried a number of variations on this snippet ...
>
> tell application "Microsoft Entourage"
> make new draft window
> set myToAddress to (convert "<[EMAIL PROTECTED]>" from text)
> set to recipient of draft window to myToAddress
> end tell
>
> All create a new draft message but then return an error of the form ...
>
> Can't set <class cDfW> to "<[EMAIL PROTECTED]>". Access not allowed.
>
> If I change "to recipient" to the plural "to recipients" the error becomes
> ...
>
> Can't set <class toSt> of <class cDfW> to "<[EMAIL PROTECTED]>".
>
> I get very similar results when trying to set the subject of a new message
> as well.
>
> Any ideas? Or am I trying to do the impossible? I truly hope not, my
boss
> has already told clients that it's on the cards.
Here is what you need
tell application "Microsoft Entourage"
set thedraft to make new draft window
set myToAddress to "[EMAIL PROTECTED]"
set myBccAddress to "[EMAIL PROTECTED]"
set to recipients of thedraft to {myToAddress}
set BCC recipients of thedraft to {myBccAddress}
end tell
Fyi, the BCC is set if you click on the address pane you will see that it is
set.
Btw if you get all your properties and then just send one appleevent to
Entourage it will be quicker, here is what I mean using the example above.
tell application "Microsoft Entourage"
set myToAddress to "[EMAIL PROTECTED]"
set myBccAddress to "[EMAIL PROTECTED]"
set thedraft to make new draft window with properties {to
recipients:{myToAddress}, BCC recipients:{myBccAddress}}
end tell
-steve
--
To unsubscribe: <mailto:[EMAIL PROTECTED]>
To search the archives:
<http://www.mail-archive.com/entourage-talk%40lists.boingo.com/>