Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Dim HTMLDoc As MSHTML.HTMLDocument
- Dim HTMLButtons As MSHTML.IHTMLElementCollection
- Dim HTMLButton As MSHTML.IHTMLElement
- Dim btnInput As MSHTML.IHTMLInputElement
- Dim ie As Object
- Dim pointer As Integer
- Set ie = CreateObject("internetexplorer.application")
- ie.Visible = True
- ie.navigate "http://www.htmlquick.com/reference/tags/input-file.html"
- Do While ie.readyState <> READYSTATE_COMPLETE
- Loop
- Set HTMLDoc = ie.document
- Set HTMLButtons = HTMLDoc.getElementsByTagName("input")
- For Each HTMLButton In HTMLButtons
- For Each btnInput In HTMLButtons
- If btnInput.Type = "file" Then
- HTMLButton.Click
- btnInput.Value = "C:temptest.txt"
- pointer = 1
- Exit For
- End If
- Next btnInput
- If pointer = 1 Then Exit For
- Next
Add Comment
Please, Sign In to add comment