VB6クラシックでは、次のことができます。
Private Sub Form_Load()
WebBrowser1.Navigate2 "http://yourSite.com"
End Sub
Private Sub Command1_Click()
With Webbrowser1
.Document.All("fieldName").Value = "some value"
'click the button
.Document.All("fieldName").Click
End With
End Sub
ただし、VB.Netでは、プロパティがないというエラーが発生するValue
ため、次のことを試しました。
With wb
' fill From field
.Document.All("fieldName").SetAttribute("Value", strFrom)
' click the button now
.Document.All("fieldName").RaiseEvent("Click")
End With
しかし、それでもエラーが発生します。
Object reference not set to an instance of an object.
オンライン:
.Document.All("fieldName").SetAttribute("Value", strFrom)
VB.netで同じことを行う方法は?