Re: 2001 - rule
- From: "Barry Wainwright [MVP]" <barry@xxxxxxxxxxxxxxxx>
- Date: Mon, 05 Jun 2006 17:23:36 +0100
The extra 'then was the subject of my following email! Sorry about that.
Error -192 usually indicates 'resource not found'. Does this happen on any
particular line?
If not, I will have to try and find a copy of entourage 2001 lying around to
see what is causing the problem.
--
Barry Wainwright
Microsoft MVP (see http://mvp.support.microsoft.com for details)
Check out the Entourage User's WebLog for hints, tips and troubleshooting
<http://homepage.mac.com/barryw/weblog/weblog.html>
From: "R. Alexander Seinfeld" <seinfeld@xxxxxxxxxxxxx>
Newsgroups: microsoft.public.mac.office.entourage
Date: Mon, 05 Jun 2006 12:09:59 -0400
Subject: Re: 2001 - rule
I really appreciate this.
I tried it but got an error message when it tried to run - "Error -192"
(script compiler had me add an extra "then" in the last clause, but that was
before running it)
in article C0AA123A.BC070%barry@xxxxxxxxxxxxxxxx, Barry Wainwright [MVP] at
barry@xxxxxxxxxxxxxxxx wrote on 6/5/06 11:54 AM:
This script will do it:
property catName:"Auto-added Contact" -- Change this category name to
anything convenient
Property openContactAfterCreation: true -- change this to false if you don¹t
want the contacts oppened after creation
tell application "Microsoft Entourage"
try
set theCat to category catName
on error
set theCat to make new category with properties {name:catName,
color:{65280, 26112, 0}}
end try
set theMessages to current messages
repeat with aMessage in theMessages
set theRecipients to (get recipients of aMessage)
repeat with aRecipient in theRecipients
set {displayName, emailAddress} to {display name of address of
aRecipient, address of address of aRecipient}
find emailAddress
if the result is {} then
set theBreak to offset of " " in (reverse of characters of
displayName as text)
if theBreak > 0 then
set lastName to text -(theBreak - 1) thru -1 of
displayName
set firstName to text 1 thru -(theBreak + 1) of
displayName
else
set lastName to displayName
set firstName to ""
end if
set theContact to make new contact with properties {first
name:firstName, last name:lastName, category:{theCat}}
make new email address at end of theContact with properties
{contents:emailAddress}
if openContactAfterCreation open theContact
end if
end repeat
end repeat
end tell
It will operate either on a filtered outgoing message, or on any number of
selected outgoing or incoming messages, creating new contacts for any
recipients not found in the address book. It will also assign a category
"Auto-added contacts", coloured Orange (you can change this name in the
first line of the script) to these contacts and optionally open the contact
after creating it for you to examine the contents.
Save the script as a compiled script & put it in the ?Entourage Script Menu
Items¹ folder in your ?Microsoft User Data¹ folder. The script can be
manually run from the menu or called as an action in a mail rule.
.
- References:
- 2001 - rule
- From: R. Alexander Seinfeld
- Re: 2001 - rule
- From: Barry Wainwright [MVP]
- Re: 2001 - rule
- From: R. Alexander Seinfeld
- Re: 2001 - rule
- From: Barry Wainwright [MVP]
- Re: 2001 - rule
- From: R. Alexander Seinfeld
- 2001 - rule
- Prev by Date: Re: 2001 - rule
- Next by Date: How to keep separate email accounts separate
- Previous by thread: Re: 2001 - rule
- Next by thread: Re: 2001 - rule
- Index(es):
Relevant Pages
|