Re: Setting the default signature in Entourage
Re: Setting the default signature in Entourage
- Subject: Re: Setting the default signature in Entourage
- From: Chris Garaffa <email@hidden>
- Date: Tue, 26 Oct 2004 22:04:37 -0400
Paul,
Thanks for your response.
On Oct 26, 2004, at 9:28 PM, Paul Berkowitz wrote:
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:
Not so much as the "reference" in the dictionary, but because of the
error message I saw: "Microsoft Entourage got an error: Expected a
reference. (-1727)"
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
This is what I was originally had tried, which resulted in the first
time I saw the error message above.
(And first make sure that signature 1 is really the one you want.
Check its
name.)
It is, unless there's a chance that with a signature file guaranteed to
contain only one signature it could throw an error. Just to make sure,
I tried:
set sigRef to (first item of every signature)
Which returns the same error.
Unless there' some bug with Exchange accounts I don't know about, that
should work when you later specify the default signature choice.
Looks like this is a bug with Exchange accounts specifically. I just
tried creating a new POP account, with the relevant signature code
looking like this:
set sigRef to signature 1
make new POP account with properties{ (*POP-related stuff here*),
default signature type: other, default signature choice: sigRef}
I wish I'd caught that before they released 10.1.6, maybe a fix could
have made it in.
--
Chris Garaffa
email@hidden
_______________________________________________
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