Dear All,
I am trying to create a macro which would allow me to look up a name in say cell A1 and then go onto an internet site in IE and use that name as the search item and then pull the email address from the profile page.
is this at all possible, if so how would i event start...?
I have managed to create the code below, so far it works but it pastes the whole site. Is there anyway to automate the parameter selection, so for example it would search through all the names in Column A and then just copy and paste a specific part of the page?
Sub query()
'
' query Macro
'
'
With ActiveSheet.QueryTables.Add(Connection:= _
"URL;http://x.com/ks/research/search/directory?searchString=[""]&referrer=search" _
, Destination:=Range("$B$2"))
.Name = Sheet1.Range("A2").Value
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = False
.RefreshOnFileOpen = False
.BackgroundQuery = True
.RefreshStyle = xlInsertDeleteCells
.SavePassword = False
.SaveData = True
.AdjustColumnWidth = True
.RefreshPeriod = 0
.WebSelectionType = xlEntirePage
.WebFormatting = xlWebFormattingNone
.WebPreFormattedTextToColumns = True
.WebConsecutiveDelimitersAsOne = True
.WebSingleBlockTextImport = False
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
End Sub
Bookmarks