Thread: [Solved] Find and Replace
View Single Post
 
Old 07-21-2011, 02:42 AM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

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]
Reply With Quote