+ Reply to Thread
Results 1 to 3 of 3

VBA on Internet Explorer: Interact with the download dialog box (Save As / View / Cancel)

  1. #1
    Registered User
    Join Date
    12-29-2014
    Location
    Tongeren, Belgium
    MS-Off Ver
    2010
    Posts
    4

    Post VBA on Internet Explorer: Interact with the download dialog box (Save As / View / Cancel)

    Hi everyone,

    I'm desperately looking for a way to "accept a download" on IE from Excel with my VBA code run from MS Excel.
    The source webpage contains a button that, when clicked, generates a pdf file and prepares the download (the file doesn't appear in any browser tab, only as a browser download proposition).

    On the website itself the download request is (in HTML) as follows:
    HTML Code: 
    I am successfully accessing the download using:
    Please Login or Register  to view this content.
    The result is that Internet Explorer pops up the dialog box "Save As / View / Cancel ?".
    I need to interact with this dialog box to accept the download or find an alternative way to download based solely on the URL.

    This action needs to be repeated hundreds of times so either:
    (1) disabling IE's dialog box to automatically accept downloads anytime (very dangerous, imho)
    (2) finding a way to interact with the dialog box to accept download
    (3) using a completely alternative coding method to download the file.

    Thanks in advance for your help!!!

  2. #2
    Forum Expert JasperD's Avatar
    Join Date
    05-07-2013
    Location
    Netherlands
    MS-Off Ver
    Excel 2016
    Posts
    1,393

    Re: VBA on Internet Explorer: Interact with the download dialog box (Save As / View / Canc

    Use WinHTTP to stream the download to file rather than IE automation.

  3. #3
    Registered User
    Join Date
    12-29-2014
    Location
    Tongeren, Belgium
    MS-Off Ver
    2010
    Posts
    4

    Re: VBA on Internet Explorer: Interact with the download dialog box (Save As / View / Canc

    Thanks for the quick response, but I'm self-taught for VBA so I admit I've never heard of WinHTTP.
    I tried to look up WinHTTP for VBA but can't figure out what it is I'm supposed to do.

    Also, I have to log in via a secure web portal in order to access the file (hence the use of IE automation). Would WinHTTP work in this context?

    Thanks in advance!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Internet Explorer Save Dialog box - VBA Autmation
    By mitko007 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-31-2015, 08:44 AM
  2. Replies: 4
    Last Post: 04-05-2014, 08:53 AM
  3. Internet Explorer and VBA : Open, Save and Cancel Dialog Box
    By codeslizer in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-08-2013, 04:49 PM
  4. Internet explorer download automation
    By exc4libur in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 05-28-2012, 05:23 PM
  5. Save dialog box cancel
    By Directlinq in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 06-19-2009, 06:10 PM
  6. Internet explorer download/XP Pro??
    By Maxwell-5000 in forum Excel General
    Replies: 1
    Last Post: 01-03-2006, 06:03 PM
  7. [SOLVED] How to use SendKeys to interact with Internet Explorer???
    By nisgore in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-19-2005, 06:05 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1