global replace

I

Ignat Solzhenitsyn

Sorry if I missing something obvious here, but is there any kind of
global replace in Entourage 2004? Anything at all akin to Word's Find
and Replace feature?

What I need to do, e.g., is to replace all occurrences of xxx.xxx.xxxx
phone numbers with +1.xxx.xxx.xxxx

Is there any automated way to do this? I am hoping to avoid having to
cut and paste the "+1." thousands of times!
 
P

Paul Berkowitz

Sorry if I missing something obvious here, but is there any kind of
global replace in Entourage 2004? Anything at all akin to Word's Find
and Replace feature?

What I need to do, e.g., is to replace all occurrences of xxx.xxx.xxxx
phone numbers with +1.xxx.xxx.xxxx

Is there any automated way to do this? I am hoping to avoid having to
cut and paste the "+1." thousands of times!

There's no way in Entourage. (Nor in Word, for that matter" Find & Replace
needs specific characters to Find and Replace - it would get very hairy with
all-wildcards except the "." .) But you can do it this way:

You could export contacts using File/Export - or, better, use Contacts
Export in my Export-Import Entourage scripts to retain categories (since
File/Export won't). Then open the tab-text file in Excel. Look for the first
column that has phone numbers - for the sake of argument, let's say it's
column F. The first cell with a phone number will be F2. In an empty column
off to the right, select the second cell. (Let's say this is column AM, so
the cell will be AM2.) Go to View menu and open the Formula Bar.

In the Formula Bar, type:

=REPLACE(F2,1,12,("+1."&F2))

(Check the Help for REPLACE to see what this does: it replaces the text in
F2, from character 1 thru 12, by "+1." and whatever is in F2.) Now select
all the cells in column AM from row 2 down to the last row that has data in
column F (or the bottom). Go to Edit menu/Fill. All the cells will now be
filled by similar replacements beginning "+1." Then, to make things quick,
copy and paste the header (cell 1) of F2 into cell 1 of AM2. Now Select the
whole of column AM2 and Cut (Edit menu, or cmd-X). Select the whole of
column F2 and Paste (or cmd-V). Now you have replaced column F with column
AM.

Repeat the same thing for all the other columns with phone numbers.

Then delete all your contacts in Entourage.

Then use File/Import (no categories) or my Contacts Import script (to retain
categories) to import all these contacts. They will now all have the +1.
prefix for all phone numbers.

--
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.
 
I

Ignat Solzhenitsyn

Thanks, Paul. Unfortunately, this will be beyond my capability, as a good
half of my numbers are not in the US format xxx.xxx.xxxx, but in another
country¹s format. If I understand your instructions correctly, they would
only work ­ I mean, work perfectly:) - if all the numbers I was replacing
were US numbers, rather than numbers that already have a +44, +33, +7, or
whatever, at the front.

This may be a case of brewing a strong pot of coffee and cutting and pasting
a couple thousand times...
 
P

Paul Berkowitz

You could check the Help, Ignat. You'd probably just need to run a few
different versions through, if that. It will simply ignore the formats that
already have the +, or anything else that you're not feeding it. If all you
need to do is preface any number that doesn't already begin +1. with that,
it's even easier.

First you have to frame what you want to do, in English. For example -
'prefix any phone number that has this format xxx.xxx.xxxx with "+1." ,
prefix any other number that doesn't begin "+" with a "+", and ignore all
numbers already beginning with "+".' Then ask on the Excel newsgroup, if you
can't figure it out. You may need to do 2 or 3 passes with separate
formulae, but I doubt it: Excel is made for this sort of stuff, and JE
McGimpsey on the Excel list will tell you how to do it, as long as you don't
expect Excel to be a mind-reader: it won't know what is a country code if
you can't tell it. You can also probably pre-select all the phone number
columns in advance, so just one pass per formula is necessary, with the
right formula.



--
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.



From: Ignat Solzhenitsyn <[email protected]>
Newsgroups: microsoft.public.mac.office.entourage
Date: Sun, 06 Nov 2005 04:11:49 GMT
Conversation: global replace
Subject: Re: global replace

Thanks, Paul. Unfortunately, this will be beyond my capability, as a good
half of my numbers are not in the US format xxx.xxx.xxxx, but in another
country¹s format. If I understand your instructions correctly, they would
only work ­ I mean, work perfectly:) - if all the numbers I was replacing
were US numbers, rather than numbers that already have a +44, +33, +7, or
whatever, at the front.

This may be a case of brewing a strong pot of coffee and cutting and pasting
a couple thousand times...
 
Top