
Using The WebBrowser and MSHTML
I use the mshtml to fill forms in on a web form.
Here is an example :
Dim xx As mshtml.OldHTMLDocument
xx = WEB1.Document
With xx.forms()
.item("name").value = "joe"
.item.submit.clicked()
End With
The .item("name") is the object on the form you wish to
input.
I hope this helps.
The only problem I have with it, or just can't figure out
is how to fill in multiple forms on a web page. It will
work with one form and multiple text fields or whatever.
But like I said not with multiple forms with multiple
fields. So if you figure it out let me know!
robert
Quote:
>-----Original Message-----
>Is there a way to make a VBScript or VBA access the
webBrowser or MSHTML
Quote:
>objects to navigate to a web page and then manipulate
elements on that web
Quote:
>page through a variable set as an object or variant?
>I have a web page at my job that is basicall a work
order form with several
Quote:
>text input boxes. I would love to create a simple script
that allows me to
>fill-in some of the input boxes. I have gotten as far as
being able to
>reference the Microsoft Internet Control (I think it is
called ShwDoc.dll)
>in the Microsoft Script Editor where I have been able to
assign variable as
>a InternetExplorer object. I am able to manipulate the
status bar or set the
Quote:
>URL (navigate) but I have been able to pass the Document
automation object
>to a variable in VBScript. I tried the same thing with
WebBrowser and got
>the same results.
>I switched to using VBA in Excel but I still could not
get the Document
>object. How would I manipulate the elements by using
such an object variable
Quote:
>from within VBA or VBScript?
>.