Sub Macro1()
'
' Macro1 Macro
'
'
Sheets("Sheet1").Select
Range("A1").Select
Dim i As Integer, myurl As String
i = 1
Do While i < 300000
myurl = "URL;http://catalog.bd.com/nexus-ecat/getProductDetail?productId=" & i & ""
With ActiveSheet.QueryTables.Add(Connection:=myurl, Destination:=Range("$A$1"))
.Name = shorturl
.FieldNames = True
.RowNumbers = False
.FillAdjacentFormulas = False
.PreserveFormatting = True
.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
.WebDisableDateRecognition = False
.WebDisableRedirections = False
.Refresh BackgroundQuery:=False
End With
Columns("A:J").Select
Selection.Copy
Range("K1").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Columns("A:J").Select
Range("J1").Activate
Application.CutCopyMode = False
Selection.Delete Shift:=xlToLeft
Columns("A:J").Select
Selection.ColumnWidth = 20.01
Columns("B:B").Select
Selection.ColumnWidth = 20.01
Rows("1:300").Select
Selection.Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
i = i + 1
Loop
End Sub