Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
search-replace: Formatting phone numbers imported from outlook
Hi,
When I create a directory in word 2003 and import phone numbers from Oulook they appear like that (I live in Japan) +nn (nn) nnnnnnnn I would like separate the country code/area code like that: +nn-nn- and then separate only the 4 first digits of the phone numbers with a "-" like that: nnnn-(followed by the second part of the number of 3 or 4 digits depending of the area) As a variante, when working with European phone number, I would like to groups all the digit by 2 separated with a "-" like that: nn-nn-nn-nn What is the string I have to write in the "Find what" and "Replace with" using wildcards for these 3 questions? Could you show me the strings separately and if possible with a word of explanation. I would like to understand the pattern. When I try do do it by myslef, the country code/area code/end of the number got all messed-up with with hyphens at the wrong place and incorrect groups of digit. Thanks |
#2
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
search-replace: Formatting phone numbers imported from outlook
For Find what, use:
(+[0-9]{1,}) \(([0-9]{1,})\) ([0-9]{4})([0-9]{3,}) and for the Replace \1-\2-\3-\4 For the explanation, see the article "Finding and replacing characters using wildcards" at: http://www.word.mvps.org/FAQs/Genera...gWildcards.htm -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Von Stussi" wrote in message ... Hi, When I create a directory in word 2003 and import phone numbers from Oulook they appear like that (I live in Japan) +nn (nn) nnnnnnnn I would like separate the country code/area code like that: +nn-nn- and then separate only the 4 first digits of the phone numbers with a "-" like that: nnnn-(followed by the second part of the number of 3 or 4 digits depending of the area) As a variante, when working with European phone number, I would like to groups all the digit by 2 separated with a "-" like that: nn-nn-nn-nn What is the string I have to write in the "Find what" and "Replace with" using wildcards for these 3 questions? Could you show me the strings separately and if possible with a word of explanation. I would like to understand the pattern. When I try do do it by myslef, the country code/area code/end of the number got all messed-up with with hyphens at the wrong place and incorrect groups of digit. Thanks |
#3
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
search-replace: Formatting phone numbers imported from outlook
Hi Doug,
That's just what I was looking for. Thanks & thanks for the link. "Doug Robbins - Word MVP" wrote: For Find what, use: (+[0-9]{1,}) \(([0-9]{1,})\) ([0-9]{4})([0-9]{3,}) and for the Replace \1-\2-\3-\4 For the explanation, see the article "Finding and replacing characters using wildcards" at: http://www.word.mvps.org/FAQs/Genera...gWildcards.htm -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Von Stussi" wrote in message ... Hi, When I create a directory in word 2003 and import phone numbers from Oulook they appear like that (I live in Japan) +nn (nn) nnnnnnnn I would like separate the country code/area code like that: +nn-nn- and then separate only the 4 first digits of the phone numbers with a "-" like that: nnnn-(followed by the second part of the number of 3 or 4 digits depending of the area) As a variante, when working with European phone number, I would like to groups all the digit by 2 separated with a "-" like that: nn-nn-nn-nn What is the string I have to write in the "Find what" and "Replace with" using wildcards for these 3 questions? Could you show me the strings separately and if possible with a word of explanation. I would like to understand the pattern. When I try do do it by myslef, the country code/area code/end of the number got all messed-up with with hyphens at the wrong place and incorrect groups of digit. Thanks |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Problem with Formatting Phone Numbers in Word 2003 | Microsoft Word Help | |||
Formatting of text problem - Help needed with Style Sheets & Search and Replace | Formatting Long Documents | |||
Formatting of text problem - Help needed with Style Sheets & Search and Replace | New Users | |||
Formatting of text problem - Help needed with Style Sheets & Search and Replace | Page Layout | |||
Why can't I see 'home phone' field when mail merging from Outlook. | Mailmerge |