Maintaining a Group

A

Alan Schaevitz

Here is a need I have that I am not clear how to do easily. I have a
category in my Entourage Address Book called "Friends". I would like to
maintain a group with the home e-mail addresses of all those in that
category. Some of these entries have more than one e-mail address (e.g., a
home address for each of the husband and wife and maybe also some business
addresses). If I display a "Friends" view, select all and drag/drop them to
a new open group, I get only the addresses that are marked as the default.

That means I don't get both the home addresses if there are two and maybe
even get a business address. I dislike the thought of cluttering my
address book with duplicate entries for the same person just to have a
separate entry for every e-mail address.

I am not sure there is a way to do this via Automator or if that is too
complicated and needs an applescript. BTW, I'd also like to do the same
thing for my "Family" category. Can anyone help me here? Thanks in
advance.
 
P

Paul Berkowitz

Here is a need I have that I am not clear how to do easily. I have a
category in my Entourage Address Book called "Friends". I would like to
maintain a group with the home e-mail addresses of all those in that
category. Some of these entries have more than one e-mail address (e.g., a
home address for each of the husband and wife and maybe also some business
addresses). If I display a "Friends" view, select all and drag/drop them to
a new open group, I get only the addresses that are marked as the default.

That means I don't get both the home addresses if there are two and maybe
even get a business address. I dislike the thought of cluttering my
address book with duplicate entries for the same person just to have a
separate entry for every e-mail address.

I am not sure there is a way to do this via Automator or if that is too
complicated and needs an applescript. BTW, I'd also like to do the same
thing for my "Family" category. Can anyone help me here? Thanks in
advance.

The simplest way is manually. Open the group, click Add button. Start typing
the first 3 letters or so of the first member of the group (or first one
that might have a second email address). The dropdown list of possible
contacts appears. Select, without clicking (use arrows), the contact in
question, and press the right arrow to get into the sublist of all the email
addresses. Use the down or up arrow to get to a non-default address and
press Return. Repeat until you've done all the non-default addresses you
want, then move on to the next group member and repeat.

No, there's no way to do anything in Entourage with Automator at the moment
since no one has written any actions (and this sure wouldn't be one). If you
know AppleScript, yes, it could be scripted. It would be a little
complicated, though.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
A

Alan Schaevitz

Thanks, Paul, for your reply although it was not what I wanted to hear :)

Your method presumes I mentally remember everyone in my Friends (or Family)
category. I am afraid that my memory is not up to the task. I find that
doing a select all and drag/drop from the Friends or Family Address Book
View into a group is a better way to do the bulk of the names. Still, I
have to go through all of them to insure I haven't inadvertently added a
business e-mail address and to find those pesky second home addresses.

Unfortunately, my scripting abilities are very rudimentary and not up to
this task. Oh well, maybe someone out there wants to take up the challenge?
I can't believe I am the only one who likes to send a group mailing to all
their family (and/or friends) on occasion and a manually built group list
has the danger of getting out-of-date and leaving a new entry in the Address
Book out of the loop.
 
P

Paul Berkowitz

Actually, my method presumes you remember nothing at all. As I said, do your
drag-and-drop, then OPEN THE GROUP and just go through the list of group
members one by one "adding" the same group member again and looking to see
if there's another address (or more) fro that contact to add. If so, add it.
If not, don't complete that one, just move on to the next member in the
list.

One of us is not understanding the other here. I don't see where you'd have
to remember anything.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
A

Alan Schaevitz

Paul, my misunderstanding. Basically, your suggestion is what I do now. I
was hoping for a single-step script or automator to do the same thing. Just
makes it easier than re-building the group entry by entry (I have a large
family!).
 
P

Paul Berkowitz

Paul, my misunderstanding. Basically, your suggestion is what I do now. I
was hoping for a single-step script or automator to do the same thing. Just
makes it easier than re-building the group entry by entry (I have a large
family!).

What do you mean "hoping for"? Like a self-creating script? ;-) Someone has
to write one. (And if you learned AppleScript that someone could be you.)
This is not in fact a hugely popular request ­ in fact no one has ever asked
for this before ­ so there's no script already in existence, if that's what
you mean. I you became adept at AppleScript you could customize things for
yourself . The trouble with scripts designed to be used by "everyone" at
large is that the scripter has to spend more than half the script supplying
umpteen options and alternative solutions, which the person scripting for
himself does not have to bother with. The script below could be much shorter
without the options.

It leaves non-contact group members (plain "Name <email address>" types with
blue dots) alone, and won't add more than one group member to the same email
address (even if you've put the same email address into more than one
contact). It does catch (add) every email address of every contact in the
group. It lets you choose between doing this for just one group (first
suggesting a selected group, or you can choose from a list of all groups) or
every group.


---------------------------



tell application "Microsoft Entourage"
display dialog "Check all groups or just one?" buttons {"Cancel", "All
Groups", "Just One"} default button 3 with icon 1

if button returned of result = "All Groups" then
set theGroups to (every group)
else
try
set theGroups to the selection
if class of theGroups ‚ list then error number ­128 --catch 'on
error'
if (count theGroups) ‚ 1 or (class of item 1 of theGroups ‚
group) then error number ­128 --catch 'on error'
set groupName to name of item 1 of theGroups
display dialog "Selected group \"" & groupName & "\", or choose
another group?" buttons {" Cancel ", "Choose", groupName} default button 3
with icon 1
if button returned of result = " Cancel " then
return --quit
else if button returned of result = "Choose" then
error number -128 --catch 'on error'
end if

on error
set groupNames to choose from list (name of every group) with
prompt "Which group?"
if groupNames = false then return
set theGroups to {group (item 1 of groupNames)}
end try
end if

repeat with theGroup in theGroups
set allEntries to every group entry of theGroup
set allEntryAddresses to address of content of every group entry of
theGroup
repeat with i from (count allEntries) to 1 by -1 --in case of
deleting
repeat 1 times
set theEntry to item i of allEntries
set {eAddress, dName} to {address, display name} of content
of theEntry
if eAddress = "" then exit repeat -- means it's a group
itself, skip (will catch it in its own turn as a group)
if dName ‚ "" then
try -- may be no such contact (by name) any longer
set theContact to contact dName
if {eAddress} is not in (every email address of
theContact) then
delete theEntry -- new group member will be made
with up-to-date email address
end if
on error -- no such contact by name
try
set theContact to item 1 of (find eAddress)
on error
--no such contact with this email address
either, just a Name <email address> type
exit repeat -- skip, go on to next group entry
end try
end try
else -- no name, just email address
try
set theContact to item 1 of (find eAddress)
on error
--no such contact with this email address either,
just an <email address> type
exit repeat -- skip, go on to next group entry
end try
end if

--now we're dealing with a contact
set allContactAddresses to (every email address of
theContact)
repeat with j from 1 to (count allContactAddresses)
set thisAddress to item j of allContactAddresses
if {thisAddress} is not in allEntryAddresses then
if dName ‚ "" then
set newListing to (dName & " <" & thisAddress &
">")
else
set newListing to thisAddress
end if
make new group entry at theGroup with properties
{content:newListing}
set end of allEntryAddresses to thisAddress -- no
duplicates
end if
end repeat
end repeat
end repeat
end repeat

beep
display dialog "Done!" buttons {"OK"} default button 1 with icon 1
end tell



-----------------------------

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
A

Alan Schaevitz

Paul, you are awesome! I haven¹t yet been able to try the script you
devised but I did quickly scan it and wish I could be that creative. As you
suggested, I do want to learn Script and have every intention of doing so,
but at 62, my learning curve is slower than it used to be. I am currently
trying to master Dreamweaver to make creative websites for my family and
some non-profits for which I have volunteered. Meanwhile, I am also trying
to master Photoshop Elements. So scripting is, unfortunately, lower on my
priority list. Hopefully, I will get there before I turn 80 ;-)

BTW, your comment regarding ³a self-creating script² is sort of what
Automator is all about, right?

I am somewhat surprised that there hasn¹t been an expressed need for a
script that creates a group from the Address Book based on some criteria
(such as category). I see a great use in this script where you could create
categories for various groups and use the script to quickly and easily
construct a group mailing list. You could add new entries to the Address
Book or changed existing entries¹ category(s), then re-run the script just
before using the group mailing list to update it.

Anyway, I thank you for your effort here. I truly appreciate your work as
an MVP and your responses in this and other news groups. They have been
invaluable to me over the years.
 
P

Paul Berkowitz

BTW, your comment regarding ³a self-creating script² is sort of what Automator
is all about, right?
No. Someone first has to write the appropriate Automator action for you ­ or
probably at least 50 to make it useful. And writing Automator actions is
much harder and more time-consuming than writing regular scripts. Automator
actions do not grow on trees.
I am somewhat surprised that there hasn¹t been an expressed need for a script
that creates a group from the Address Book based on some criteria (such as
category). I see a great use in this script where you could create categories
for various groups and use the script to quickly and easily construct a group
mailing list. You could add new entries to the Address Book or changed
existing entries¹ category(s), then re-run the script just before using the
group mailing list to update it.
Who said there has not been an expressed need for such a script? Naturally
there has been. What I said was that there was never an expressed need for
adding every email address of every group member-contact to the same group,
as you asked for. To make (or update) a group from a category, get my free
script "Category Group X" from

MacScripter.net <http://macscripter.net/scriptbuilders/>

It's been out several years. It will include contacts which have the
category as secondary as well as primary, can turn non-contact name + email
address group members into full contacts if you chose that option, and will
assign the category to the group itself.
Anyway, I thank you for your effort here. I truly appreciate your work as an
MVP and your responses in this and other news groups. They have been
invaluable to me over the years.

OK, thank you ­ and you're welcome.

--
Paul Berkowitz
MVP MacOffice
Entourage FAQ Page: <http://www.entourage.mvps.org/faq/index.html>
AppleScripts for Entourage: <http://macscripter.net/scriptbuilders/>

Please "Reply To Newsgroup" to reply to this message. Emails will be
ignored.

PLEASE always state which version of Microsoft Office you are using -
**2004**, X or 2001. It's often impossible to answer your questions
otherwise.
 
Top