Good point. I hadn't thought of that. I just cut and pasted a post I
had made somewhere else earlier in the day.
For completeness, precede my instructions with ..
Ctrl+A
Format > Autoformat > OK
And follow them with ..
Ctrl+F6 to switch back to the original document
Ctrl+Z to undo the autoformatting
If the email addresses are not hyperlinks, you would have to run
autoformat first to make them so.
--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP
My web site
www.gmayor.com
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Tony Jollans wrote:
If you have Word 2002 or 2003 you can do this without code ...
Press Alt+F9 to toggle field codes
Press Ctrl+F to get the Find Dialog
In the Find what box enter ^d hyperlink "mailto
Check the "Highlight all Items" checkbox
Click on "Find All"
Click on Close
Press Alt+F9 to toggle field codes off
Press Ctrl+C to copy all the e-mail hyperlinks found
Press Ctrl+N to open a new document
Press Ctrl+V to paste the e-mail addresses
message Macro to extract all of the email addresses from a document
Sub CopyAddressesToOtherDoc()
Dim Source As Document, Target As Document, myRange As Range
Set Source = ActiveDocument
Set Target = Documents.Add
Application.ScreenUpdating = False
Source.Activate
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(findText:="[+0-9A-z._-]{1,}\@[A-z.]{1,}", _
MatchWildcards:=True, Wrap:=wdFindStop, Forward:=True) = True
Set myRange = Selection.Range
Target.Range.InsertAfter myRange & vbCr
Loop
End With
Selection.HomeKey Unit:=wdStory
Target.Activate
End Sub
--
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
i have a text from my supplier and it includes hundreds of email
adresses with lots of text and i dont want to select all email
adresses one-by-one.Can
Word have an option like selecting all the email adresses on a
word document?