this will populate number of html files depending on size of your range
Private Sub html()
Dim meta As String, meta1 As String, meta2 As String
Dim header As String, body As String
Dim component As String, filename As String, html As String
Dim strDestFile As String, temp As String
Dim iFileNum As Integer, Lrow As Integer, i As Integer
' Set component and filename range as required
Lrow = ThisWorkbook.Worksheets(1).Range("A" & Rows.Count).End(xlUp).Row
For i = 1 To Lrow
component = ThisWorkbook.Worksheets(1).Range("A" & i).Value
filename = ThisWorkbook.Worksheets(1).Range("B" & i).Value
meta = "<!DOCTYPE HTML PUBLIC " & Chr(34) & "-//W3C//DTD " _
& "HTML 4.0 Transitional//EN" & Chr(34) & ">"
header = "<HTML><HEAD><TITLE>" & component & "</TITLE></HEAD>"
body = "<BODY><h1>" & component & "</h1>" & "<img src=" & Chr(34) & _
filename & Chr(34) & " width=" & Chr(34) & "645" & Chr(34) & " height=" _
& Chr(34) & "645" & Chr(34) & "></BODY></HTML>"
' Set file destination if required
strDestFile = "c:\a\text.html"
iFileNum = FreeFile
Open strDestFile For Output As #iFileNum
' If an error occurs report it and end.
If Err <> 0 Then
MsgBox "Cannot open filename " & strDestFile
End
End If
Print #iFileNum, meta
Print #iFileNum, header
Print #iFileNum, body
Close #iFileNum
Next i
End Sub