Click here to Skip to main content
15,891,684 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have this Private Sub below which automatically download files from a web page using WebBrowser control. There is any way to change (programmatically) path and filename before user click on save button of WebBrowser "Save As" dialog?

What I have tried:

VB
Private Sub File_Download()
        Dim _Elements As HtmlElementCollection = WebBrowser.Document.GetElementsByTagName("input")
        For Each _Element As HtmlElement In _Elements
            If _Element.GetAttribute("value").Contains("Download") Then
                _Element.InvokeMember("click")
            End If
        Next
    End Sub
Posted
Comments
Maciej Los 20-Mar-18 15:14pm    
As far as i know - NO!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900