HTML Page Title in Excel VBA
I know that this is fairly old but I\'m having difficulty with this. I\'ve built a browswer history parser that goes through the history dat
Try this. Works fine for me in MS Excel 2010
Dim title As String
Dim objHttp As Object
Set objHttp = CreateObject("MSXML2.ServerXMLHTTP")
objHttp.Open "GET", "http://www.google.com/", False
objHttp.Send ""
title = objHttp.ResponseText
If InStr(1, UCase(title), "<TITLE>") Then
title = Mid(title, InStr(1, UCase(title), "<TITLE>") + Len("<TITLE>"))
title = Mid(title, 1, InStr(1, UCase(title), "</TITLE>") - 1)
Else
title = ""
End If
MsgBox title