![]() |
#1
|
|||
|
|||
![]()
All i need is Double spaces before and after E-mail Address and another Alphanumeric Marked in RED (at times there wont be any space before E-mail address)
Example 1 (TC_vd-Sdi-IB-BtunVp-0000090494 March 7,2001 (954) 435-2040 108 LG-P-2600 FREE ON 18 MONTHS CONTRACTS 9 75 250 1/2 Rental for 5 Months CORPORATE HARRIET K ABEL TAG ONLINE INC. 1740 MARK MEAD LN HH moises@pacbell.net Greenwood C 61198 Multy Family Home VG115450 jackquolyn rasey VD2140 West Milford Services B 200 400 MasterCard Gold Card H 5072236280141358 January 02, 20Q3 ) Example 2 (TC_vd-Sdi-IB-BtunVp-0000220982 March 7,2001 (540) 371-7962 49 Nokia-3230 FREE ON9 MONTHS CONTRACTS 9 75 250 1/2 Rental for Months PERSONAL HAROLD MONROE ARIES CARGO 5610 VAN GOGH WAY pitt@comcast.net H DALLASKS 99662 Single Family Home H CA697607 Jeffrey Tsu VD101L BEST BUY #375 200 400 MasterCard Titanium 8887505442162508 NovemberOl, 2004 ) Example 3 (TC_vd-Sdi-IB-BtunVp-0000082629 May 1,2003 (530) 673-7915 39 Sony Ericsson-W700i FREE ON 18 MONTHS CONTRACTS 12 100 300 l/2 Rental for 3 Months CORPORATE HAROLDEJ FAGAL THE MUNICENTER 304 WestJefferson olmomigdaba@msn.com MIRA LOMA NY B 24113 Apartment CI464072 Litx R Dahl VD2102 TAOS MOUNTAIN ELECT., INC 200M 400 MasterCard Titanium 1481380726124624 November 01,2002 ) Your help in this matter will be highly appreciated |
#2
|
||||
|
||||
![]()
hi xavier,
If there is no space before the email address, how is the 'Find' supposed to identify where the email address begins? This is easy enough where the email address is preceded by a paragraph break, but is really not possible where it's simply a matter of a missing space. For an email address preceded by one or more spaces, try a wildcard Find/Replace where: Find = "[ ]{1,}([! \@]{1,}\@*.[! ]{1,})[ ]{1,}" Replace = " \1 " For the alpha-numeric strings, try a wildcard Find/Replace where: Find = "<[A-Z]{2}[0-9]{6}>" Replace = "^&" and set the colour format the replacement as red.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
![]()
Hi!
The Second Widcard worked perfect. ![]() But the First one for E-mail ID has some prob i quess ![]() is there anything wrong with the way i did. Anyways can you help me with the attached file please and a WILDCARD for the same Regards and Thanks you for the same Xavier Quote:
|
#4
|
||||
|
||||
![]()
Hi xavier,
The first F/R won't work because many (if not all) of the 'email' addresses in your document are formatted as hyperlinks (even though someone has formatted them to look like plain text). You can convert the hyperlinks back to plain text via Ctr-A, then Ctrl-Shift-F9. However, you then will have to do the cleanup work that we discussed in your other thread, because unlinking the hyperlinks will cause the email addresses that lack spaces after them to become joined to the following text. A better way of handling the email addresses would be to use a macro like: Code:
Sub Demo() Application.ScreenUpdating = False Dim Fld As Field For Each Fld In ActiveDocument.Fields If Fld.Type = wdFieldHyperlink Then With Fld.Result .Style = "Hyperlink" If .Characters.Last.Next <> " " Then .Characters.Last.Next.InsertBefore " " If .Characters.Last.Next.Next <> " " Then .Characters.Last.Next.InsertBefore " " If .Characters.First.Previous <> " " Then .InsertBefore " " If .Characters.First.Previous.Previous <> " " Then .InsertBefore " " End With End If Next Application.ScreenUpdating = True End Sub
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#5
|
|||
|
|||
![]()
I really appreciate your reply on the right time........
Thanks a lot ............ |
#6
|
|||
|
|||
![]()
hI!
Am facing a problem with Macros i have created some macros for some Find and Replace etc. For E.g.: Alt + a for Macro 1 but when i press Ctrl + a to select all ......... the macro of Alt + a is played. If i have assigned a macro to a key ....... i cannot press those keys in combination with Ctrl for any other purpose. I tried re Installing my Word but the same thing remains what do i do...........??????? |
#7
|
||||
|
||||
![]()
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
![]() |
Tags |
find and replace |
Thread Tools | |
Display Modes | |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
kjxavier | Word | 9 | 08-11-2011 04:47 AM |
![]() |
shabbaranks | Excel | 4 | 03-19-2011 08:38 AM |
find and replace | anil3b2 | Word | 0 | 08-03-2010 11:30 PM |
help with find and replace | sjkiss | Word | 1 | 04-12-2010 08:08 AM |
Find /Replace Help | ilcaa | Word | 2 | 11-02-2009 08:41 AM |