![]() |
|
#1
|
||||
|
||||
![]() In that case maybe Code:
Sub Macro1() Dim oRng As Range Dim oWord As Range Set oRng = ActiveDocument.Range With oRng.Find Do While .Execute(FindText:="_") Set oWord = oRng.Duplicate If oWord.Words(1).Start <> ActiveDocument.Range.Start Then oWord.MoveStartUntil Chr(32), wdBackward oWord.MoveEndUntil Chr(32) & Chr(13) If InStr(1, oWord.Text, "@") = 0 Then oRng.Text = " " End If oRng.Collapse 0 Loop End With lbl_Exit: Set oRng = Nothing Set oWord = Nothing Exit Sub End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
![]() |
Tags |
macro replace email |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Hide Email Address of Previous Email when Replying or Forwarding | bondingfortoday | Outlook | 0 | 03-05-2016 04:29 PM |
Add link to email address that hides the actual address or makes it inaccessible to online bots | richiebabes | Word | 1 | 09-03-2014 03:22 PM |
Macro to send from non-default email address | k.n. | Mail Merge | 5 | 12-03-2013 03:22 AM |
Mail Merge Many URLs in one email by common email address | instantaphex | Mail Merge | 3 | 04-29-2013 05:46 PM |
Remove a Group Email address from Outlook | meppwc | Outlook | 0 | 10-17-2012 07:09 AM |