![]() NOTE - The only issue I had was that after calling SetValue to put a specific file name in the Save As dialogue and clicking Save (Invoke), the download doesn't recognise the specified file name and still uses the default file name provided by the web site. downloadResult - Output string returned to the caller showing whether the file was successfully download or not, including the file name of the downloaded file (including its path if saveInFolder was specified).įunction return value - True: the file was downloaded False: the file was not downloaded.replaceExistingFile - True to replace the file if it already exists False to overwrite the file.Specify "" to use the file name provided by the web site. saveAsFileName - The file name which the downloaded file will be given.Specify "" to save the file in IE's default download folder. saveInFolder - The folder path where the downloaded file will be saved.If necessary, call IE_Click_Tab_Like to activate the required tab before calling this function. The Download Notification Bar must be displayed in the active tab. Public Function IE_Download_File_Using_UIAutomation(IEhwnd As Long, ByVal saveInFolder As String, ByVal saveAsFileName As String, ByVal replaceExistingFile As Boolean, ByRef downloadResult As String) As Boolean To use for your own web site downloads you would automate IE and do whatever is necessary to make the Download Notification Bar appear at the bottom of the IE window and then call IE_Download_File_Using_UIAutomation. Here is VBA code which automates the complete 'Save As' file download procedure in IE11, when a download is offered by IE's Download Notification Bar. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |