Does anyone know of a script that will examine all my contacts, and
modify all phone numbers, be they work, mobile, fax etc etc; where
there is a "+" at the beginning of the number, make no changes; where
there is no "+" at the beginning, add a single "+" to the beginning of
the number.
Here you go. Copy and paste it into Script Editor
(/Applications/AppleScript/) and click Compile.
To save it to use again, save it as a Script (the default) in the Entourage
Script Menu Items folder of Microsoft User Data folder (in ~/Documents of
your OS X user) - it will then be available in the Entourage script menu.
---------- Prefix + to Phones --------------
tell application "Microsoft Entourage"
set cl to every contact whose home phone number ‚ "" and home phone
number does not start with "+"
repeat with c in cl
tell c to set home phone number to ("+" & (get home phone number))
end repeat
set cl to every contact whose other home phone number ‚ "" and other
home phone number does not start with "+"
repeat with c in cl
tell c to set other home phone number to ("+" & (get other home
phone number))
end repeat
set cl to every contact whose home fax phone number ‚ "" and home fax
phone number does not start with "+"
repeat with c in cl
tell c to set home fax phone number to ("+" & (get home fax phone
number))
end repeat
set cl to every contact whose business phone number ‚ "" and business
phone number does not start with "+"
repeat with c in cl
tell c to set business phone number to ("+" & (get business phone
number))
end repeat
set cl to every contact whose other business phone number ‚ "" and other
business phone number does not start with "+"
repeat with c in cl
tell c to set other business phone number to ("+" & (get other
business phone number))
end repeat
set cl to every contact whose business fax phone number ‚ "" and
business fax phone number does not start with "+"
repeat with c in cl
tell c to set business fax phone number to ("+" & (get business fax
phone number))
end repeat
set cl to every contact whose mobile phone number ‚ "" and mobile phone
number does not start with "+"
repeat with c in cl
tell c to set mobile phone number to ("+" & (get mobile phone
number))
end repeat
set cl to every contact whose assistant phone number ‚ "" and assistant
phone number does not start with "+"
repeat with c in cl
tell c to set assistant phone number to ("+" & (get assistant phone
number))
end repeat
set cl to every contact whose main phone number ‚ "" and main phone
number does not start with "+"
repeat with c in cl
tell c to set main phone number to ("+" & (get main phone number))
end repeat
set cl to every contact whose pager phone number ‚ "" and pager phone
number does not start with "+"
repeat with c in cl
tell c to set pager phone number to ("+" & (get pager phone number))
end repeat
set cl to every contact whose custom phone number one ‚ "" and custom
phone number one does not start with "+"
repeat with c in cl
tell c to set custom phone number one to ("+" & (get custom phone
number one))
end repeat
set cl to every contact whose custom phone number two ‚ "" and custom
phone number two does not start with "+"
repeat with c in cl
tell c to set custom phone number two to ("+" & (get custom phone
number two))
end repeat
set cl to every contact whose custom phone number three ‚ "" and custom
phone number three does not start with "+"
repeat with c in cl
tell c to set custom phone number three to ("+" & (get custom phone
number three))
end repeat
set cl to every contact whose custom phone number four ‚ "" and custom
phone number four does not start with "+"
repeat with c in cl
tell c to set custom phone number four to ("+" & (get custom phone
number four))
end repeat
beep
display dialog "All done!" buttons {"OK"} default button 1 with icon 1
end tell
---------------------end script -----------------
--
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.