Re: Setting the default signature in Entourage
Re: Setting the default signature in Entourage
- Subject: Re: Setting the default signature in Entourage
- From: Paul Berkowitz <email@hidden>
- Date: Tue, 26 Oct 2004 18:28:58 -0700
On 10/26/04 2:39 PM, "email@hidden" <email@hidden> wrote:
> Everything works
> fine, except for setting the default signature. I'm currently using this code:
> tell application "Microsoft Entourage"
> --set sigRef to a reference to signature 1 (*I've also tried this instead of
> the next line*)
> copy (a reference to signature 1) to sigRef
> make new Exchange account with properties {name:(gLastName & "'s Exchange
> Account") as string, Exchange server:gMailServerAddr, Exchange ID:gLastName,
> password:pass, domain:"tlpeast.com", free busy server:gPublicAddr, include in
> send and receive all:true, full name:gFullName, email address:emailAddress,
> SMTP server:"wilmail.tracylocke.com", LDAP server:"wilton-pdc", default
> signature type:other, default signature choice:sigRef}
> end tell
>
> I've confirmed that all variables in the make new Exchange account statement
> are
> correct. If I remove the "default signature choice" item of the properties,
> the
> account is created and all is well. With that item in the properties, I get
> "Microsoft Entourage got an error: Expected a reference. (-1727)"
> My app copies the standard company signature file to the appropriate location
> in
> Microsoft User Data before launching Entourage, and there is only one
> signature
> in the list. The code
> tell application "Microsoft Entourage"
> name of signature 1
> end tell
> returns the correct name.
>
> Can someone point me in the correct direction here? It would be much
> appreciated.
Why are you setting it a reference? OK, I know why. The 'reference' in the
dictionary:
default signature choice - reference -- to the signature, if
default signature type is other
just means "an application object", which in case should be a signature.
Dictionaries often say the type is 'reference' when more than one type can
fit the bill. Here the only correct type is signature, so the dictionary
really could say 'signature' instead of 'reference'. But I've noticed that
dictionaries are sometimes shy of specifying one of their own application
classes and instead will use the the generic AppleScript class 'reference'.
Anyway what you want is
set sigRef to signature 1
(And first make sure that signature 1 is really the one you want. Check its
name.)
Unless there' some bug with Exchange accounts I don't know about, that
should work when you later specify the default signature choice.
--
Paul Berkowitz
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Applescript-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden