Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Access secure website to download flat text files

Posted on 2004-04-05
5
Medium Priority
?
367 Views
Last Modified: 2010-05-02
I am trying to automate accessing a secure website in order to download three flat text files using VB's webbrowser control. I want to do this all behind the scenes because the operators for this application or not savvy enough to enter id's and passwords and download the files themselves.

The website requires an organization id, a password, and a selection of being a downloader (yes) or a representative (no) in the form of a radial/option button. Onces these items are filled in and seleted, then the user will typically click the Login button which will take them to the secure site to download the files.

From that point there is another selection process (selecting to download "all files" or files individually). And then the dialog box asking to open or save will come up (I want this hidden as well). I want to save to the local PC and then exit the site.

Any good places I can look for this information on "how-to" or any suggestions?

Thank you!
0
Comment
Question by:brownkj1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 14

Accepted Solution

by:
aelatik earned 2000 total points
ID: 10760429
You can use the Internet Explorer to navigate to that website in invisible mode and do your thing.

You navigate through it like this :

        Dim IE
        Set IE = CreateObject("InternetExplorer.Application")
        IE.Navigate "http://www.go.com.mt/mygo/index.jsp"
        IE.Visible = True
        While IE.Busy
        DoEvents
        Wend
        IE.Document.All("msisdn").Value = "mynumber" ' contains the HTML name of the object
        IE.Document.All("password").Value = "mypassword" ' contains the HTML name of the object
        IE.Document.All("my_go_login").submit ' contains the HTML name of the object
0
 

Author Comment

by:brownkj1
ID: 10760800
Okay, all of that works great and I'm on the last leg of getting this completed (THANK YOU). One last question if you don't mind???

I am on the last step where I have to download the file itself. Problem is a dialog box pops up and says, "Open, Save To Disk, Cancel". I need this to be invisible as well and done behind the scenes. Would you be able to offer some suggestions on that as well?




0
 
LVL 14

Expert Comment

by:aelatik
ID: 10761004
Thats a difficult part, you can't hide it directly. But you can wait till it starts loading and then hide it. Try this out. ( I can't think of an other method )

        Dim IE
        Dim objShell
        Dim objShellWindows
        Set objShell = CreateObject("Shell.Application")
        Set objShellWindows = objShell.Windows
        Set IE = CreateObject("internetexplorer.application")
        Dim Done
            Done = False
        Do Until Done = True
        For Each IE In objShellWindows
            If LCase(IE.LocationURL) = "http://www.google.nl/" Then
                IE.Visible = True
                Done = True
            End If
        Next
        Loop
0
 

Author Comment

by:brownkj1
ID: 10761149
Is there no way to use the Silent property on the IE object? I can set Silent to true but I'm not sure how I can get to the "Save As" and save the actual file from there.

This doesn't open as a website, it opens as a file "save as" dialog box, therefore I don't think I can use the above scenario.

0
 

Author Comment

by:brownkj1
ID: 10761239
I am going to go ahead and give you the points for the answer you provided, which was excellant, to help me with my first and main problem. I will reopen the second issue as another question (which you're more than welcome to help on as well).

I think that would be fair, more so than making you answer two questions for one set of points!

Thanks again!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question