Robert said:
The document has media listed in it in the following types of format,
Name
Address
Telephone
Fax
Name
Email
Email
Information
and I want to be able to export only the email addresses from this
large file.....
Workbooks.OpenText Filename:=strPath & "\Config.txt", Origin:=437, _
StartRow:=1, DataType:=xlDelimited,
TextQualifier:=xlDoubleQuote, _
ConsecutiveDelimiter:=False, Tab:=False, Semicolon:=False,
Comma:=False _
, Space:=False, Other:=False, FieldInfo:=Array(1, 1), _
TrailingMinusNumbers:=True
Cells.Select
Range("A1").Activate
ActiveWorkbook.Worksheets("Config").Sort.SortFields.Clear
ActiveWorkbook.Worksheets("Config").Sort.SortFields.Add
Key:=Range("B1"), _
SortOn:=xlSortOnValues, Order:=xlAscending, DataOption:= _
xlSortTextAsNumbers
With ActiveWorkbook.Worksheets("Config").Sort
.SetRange Range("A1:X10000")
.Header = xlNo
.MatchCase = False
.Orientation = xlTopToBottom
.SortMethod = xlPinYin
.Apply
End With
TextStr = "Email"
Call FindText
ActRow = ActiveCell.Row - 1
Rows("1:" & ActRow).Select
Selection.Delete Shift:=xlUp
Range("A1").Select
Fax
Sub FindText()
Selection.Find(What:=TextStr, After:=ActiveCell, LookIn:=xlFormulas
_
, LookAt:=xlPart, SearchOrder:=xlByRows,
SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
End Sub
--