IEのWindowオブジェクトを取得すれば、Documentプロパティでページの内容を取得/設定できる。
Dim sh As Object
Dim ie As Object
Dim inp As Variant
Dim i As Long
Dim cnt As Long
Set sh = CreateObject("Shell.Application")
For Each ie In sh.Windows
If ie.FullName Like "*\IEXPLORE.EXE" Then
Exit For
End If
Next
If ie Is Nothing Then
Set sh = Nothing
Exit Sub
End If
cnt = ie.Document.all.tags("input").length
For i = 0 To cnt - 1
With ie.Document.all.tags("input")(i)
If .Name = "q" Then
Googleの検索文字 = .Value
Exit For
End If
End With
Next
Set ie = Nothing
Set sh = Nothing