+ Reply to Thread
Results 1 to 3 of 3

Automatically open document from website using vbscript

  1. #1
    Forum Contributor
    Join Date
    02-16-2006
    MS-Off Ver
    OFFICE 365
    Posts
    244

    Automatically open document from website using vbscript

    I am working on a script to automatically open a file from a website. I have gotten to the part where I receive a prompt from IE to either open or save the document and I would like to open the document. Following is the code I'm using to get to the prompt:

    Please Login or Register  to view this content.
    Is there a way to choose Open in the IE11 prompt using coding? Any help would be appreciated.


    Thanks,

    Met

  2. #2
    Forum Guru Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds
    MS-Off Ver
    365 Win 11
    Posts
    7,239

    Re: Automatically open document from website using vbscript

    No, not easily. You could try send keys but it's somewhat unreliable. One of the problems you have is that you need to use windows APIs to get a handle to the popup window and select the button, this is made more difficult by the fact that no all users will get this prompt depending on how they have IE configured, they could see a ribbon or the download manager for example.

    In summary the only really reliable way is to not use IE at all and use HTTP requests to get the document directly which may or may not be complicated depending on the site and your knowledge level.

  3. #3
    Forum Contributor
    Join Date
    02-16-2006
    MS-Off Ver
    OFFICE 365
    Posts
    244

    Re: Automatically open document from website using vbscript

    Kyle:

    Thanks for the information.

    In case someone else stumbles across this post I was able to achieve what I was wanting. Following is an excerpt of the code I used:

    Please Login or Register  to view this content.
    Note: I decided to save the file instead of opening the file but you can open the file also.

    Thanks again..

    Met

+ 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. How to open a website and click on a link and open the file to capy
    By CityMPLSEmpolyee in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-13-2016, 02:12 PM
  2. Replies: 1
    Last Post: 07-25-2014, 08:51 AM
  3. Open website in excel automatically when the excel file would be opened
    By soumendu_bose in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-25-2014, 10:07 AM
  4. open excel source document in background when i open word document
    By hootiebsc in forum Word Programming / VBA / Macros
    Replies: 5
    Last Post: 03-22-2013, 07:50 PM
  5. Not able to open password protected xls file with vbscript
    By xtension in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-08-2013, 05:14 AM
  6. Replies: 14
    Last Post: 08-17-2012, 10:54 AM
  7. Replies: 3
    Last Post: 04-07-2006, 04:10 AM

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