By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,953 Members | 1,131 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,953 IT Pros & Developers. It's quick & easy.

Automating Internet Explorer from MS Access

P: 2
Greetings:

I'm looking for some help in automating (what I thought would be) a simple procedure in Internet Explorer. I'm trying to put the following operation under a button click in an MS Access database form:

1. Navigate to URL and click button
2. Enter user name and password
3. Apply filters (enter criteria in text boxes)
4. Execute query (another button click)
5. Export results to network server
6. Data mining using Monarch software
7. Export to Access
8. Run Attachmate macro to input data to mainframe system

I am not a legitimate programmer, but have had some success in picking up vb(a) over the years just by using the help topics in the vb editor in MS Access modules. Remarkably, I've figured out items 1, 6, 7, and 8 myself. I think if I could just get some help with code that would enumerate the names or tags or ids of the elements on the web page, I could finish 2 - 5.

Can anyone provide vb code using the Microsoft Internet Explorer references library, and/or the Microsoft HTML references library that would show me a list of the elements on a web document? An example of how to use getElementbyId or TagName (or your own better idea) to perform subsequent text and click operations would also be handy.

Much obliged! This code is going to save hours and hours of repetetive data manipulation every week for an office of about 200 people.
Mar 15 '07 #1
Share this Question
Share on Google+
4 Replies


100+
P: 1,646
Moved your thread to the access forum
Mar 16 '07 #2

nico5038
Expert 2.5K+
P: 3,072
I've used in the past the code from:
http://www.planet-source-code.com/vb/scripts/ShowCode.asp?txtCodeId=58524&lngWId=1

This will get the selected text and thus save the copy/paste for the user.

The HTMLDocument will allow the manipulation of the fields, but I've not experimented with that yet...

Nic;o)
Mar 17 '07 #3

Denburt
Expert 100+
P: 1,356
If I were you I would do my best to try a more direct approach, If this is on your companies intranet find out the type of database, location etc. and get the data that way. If it is on the internet maybe you could contact the company and get them to set up an XML file.

If you really want to or have the need to root through the webpage remember any names or ID they are using today might change tomorrow. This said I have a ton of code used to interface with WebPages, from a previous project, however it is at home at the moment. I will gladly dig it up when I get there but I may be able to get you started, if I am not mistaken it would be something to the effect of:

Expand|Select|Wrap|Line Numbers
  1. Set myPage = Application.FollowHyperlink(Address, SubAddress, NewWindow, AddHistory, ExtraInfo, Method, HeaderInfo)
From there you should be able to refer to the elements on the page using the object myPage.

Hope this helps!
Mar 19 '07 #4

P: 2
Thanks to all, and sorry I've been incommunicado. I tried the above listed tips, and quickly moved into territory that is beyond my skill scope. So, I figured out that the web app is actually calling some other software that is also available to me through my company and will attempt to engineer the whole procedure by executing the software directly, instead of through the intranet site.

I appreciate the time taken to reply to me, and hope that it wasn't too much!

Many thanks!
Apr 3 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.