+ Reply to Thread
Results 1 to 5 of 5

VBA to Automate the a click on the "Open,Save,Save As" Windows Internet Explorer Dialog

  1. #1
    Registered User
    Join Date
    02-21-2014
    Location
    Orlando,Fl
    MS-Off Ver
    Excel 2007
    Posts
    3

    Question VBA to Automate the a click on the "Open,Save,Save As" Windows Internet Explorer Dialog

    Hello all!

    I've recently had to start creating macros to automate some of the processes as my job. The current project that I am working on involves logging into a secure website, SalesForce, and direct downloading a report in CSV format.

    The current code that I have works great for logging into the site and grabbing the downloaded file, but the problem is there is a "Windows Internet Explorer" download dialog box with the buttons: Open, Save, Save as.

    I really would love to automate the click of the "Open" option, but I just can't seem to figure it out. I've had no luck finding any examples that would explain the process to me, hence why I'm asking for help here.

    I currently have no code for this part of the process and would really love some guidance. I will be happy to post my code, but it won't do much good if you can't log-into the site.

    Thanks so much for taking the time, in advance!

    Below is an image of what I am trying to automate.

    Capture.PNG

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: VBA to Automate the a click on the "Open,Save,Save As" Windows Internet Explorer Dialo

    maybe you don't need Internet Explorer for dowloading, try this code
    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    02-21-2014
    Location
    Orlando,Fl
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: VBA to Automate the a click on the "Open,Save,Save As" Windows Internet Explorer Dialo

    Hi patel45,

    Thanks so much for taking the time to respond! Your help is much appreciated!

    I plugged your code into a new macro with the website I need to use, and it definitely seems to grab the file name but the actual data from the report is not showing up. It just seems to add a new sheet with the report name, and then the actual sheet is completely white.

    I'll share my code for going online and grabbing the website. I blocked out the actual file name, my username, and password; as this is a secured website.

    Thank you so much in advance for taking the time!






    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    02-21-2014
    Location
    Orlando,Fl
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: VBA to Automate the a click on the "Open,Save,Save As" Windows Internet Explorer Dialo

    Any more help on this by chance?

    Thanks in advance!

  5. #5
    Registered User
    Join Date
    01-30-2014
    Location
    United Kingdom
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: VBA to Automate the a click on the "Open,Save,Save As" Windows Internet Explorer Dialo

    I can add something to this: The problem is that the link is not to a file; it is a link that causes a script to execute, and the script causes the appropriate file to be sent to IE, etc. The method that @Patel45 suggests only works if the link is to a file (eg ends with .csv, etc).

    I am having the same problem myself, but you may want to investigate the Connect for Office that Salesforce provide from your Salesforce login page > Setup > Desktop Integration. That approach normally works very well for me and allows you to do exactly what you want, but for me it doesn't always work because of security and blocked IP addresses over VPN. So if there were any way to automatically press the "Open" button I would love to hear it!

+ 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 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
  2. macro to open click "Save as" in intrnet explorer pop up
    By crobledo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-16-2013, 11:06 AM
  3. VBA - IE - click on "Open" in an internet explorer "file download" window
    By victoire in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 01-22-2013, 07:08 AM
  4. Force "Save As" dialog to default to a specific directory?
    By devolve in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-21-2011, 03:37 AM
  5. Open Internet Explorer as "InPrivate"
    By cerothen in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-04-2011, 04:02 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