Open Internet Explorer & Download File

  • Hi Everyone,


    Setup: We have a file which is constantly being updated that users need to access and work with. Due to the spread of the users (and access rights) they cannot all have access to the server it is kept on so we have come up with the idea to keep it on the company intranet where it can be refreshed by us and downloaded by the user. The reason why we would like to kick this action out of Excel is slightly more complicated but hopefully the below will be enough to go on.


    I'm trying to write a macro in Excel that will accomplish the following;


    1) Start Internet Explorer (IE)
    2) Navigate to an address
    3) Select a file to Download
    4) Either open/save this file
    5) Access this file and start a macro within it.


    I can get steps 1, 2 and 3 done but then I come across problems.


    Is there a way to get IE to just pick the open or save option on the download dialogue box rather than having the user select it?


    Option 1 - Force to 'Open'
    If the option is selected to open and then you end up with the application (in this case PowerPoint) embedded in IE, is there a syntax that allows you to control the embedded application?


    Option 2 - Force to 'Save'
    If the option can be forced to save, can I capture the save location selected? (That way I could open the document and operate it much more easily)
    _____


    All thoughts and any other options to put into the fray here would be more than welcome.


    Thanks in advance,
    Ian

  • Re: Control Internet Explorer And Embedded Application


    hi Ian,


    code for item #1 :

    Code
    Sub ExplorerOpen()
    Shell "C:\Program Files\Internet Explorer\IEXPLORE.exe"
    End Sub


    as for the rest, i haven't figured them out yet.
    hope this will be a good start :)

    Cheers
    ___________
    Xlite :sheep:
    [st]All you need to learn VBA is an internet connection and Ozgrid.com[/st]

  • Re: Control Internet Explorer And Embedded Application


    you can use this code to open:

    Code
    Workbooks.Open Filename:="http://www.excelstation.com/wmp.xla"

    Cheers
    ___________
    Xlite :sheep:
    [st]All you need to learn VBA is an internet connection and Ozgrid.com[/st]

  • Re: Control Internet Explorer And Embedded Application


    Thanks for that,


    It's given me a really great thread to work with..I didn't think I could identify the filename as an internet address...


    In fact I think that's solved everything. I now have;



    This starts PowerPoint, opens the file from the intranet server (but keyly NOT embedded in Internet Explorer) and then starts the macro I need to execute.


    Thanks very much for the help here xlite.
    Ian

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!