Results 1 to 4 of 4
  1. #1
    smikkelsen is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Mar 2010
    Posts
    60

    VBA Code for working with IE


    I have a somewhat strange question. I can't really find any info on this, so i'm not sure if its ever done, or even can be done.

    I would like to launch a new instance of Internet explorer, and use DOM to manipulate the browser using VBA in my access database. Has anyone ever done anything remotely close to this, or knows if it is possible?

    Just as a simple example, if I had an onclick event that launched IE and logged into a gmail account using dom. I have done this in other languages, I would just like to be able to incorporate it into my database.

    Thanks

  2. #2
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    I never really understood the DOM thing, but I know what it stands for. In my humble opinion, just about the best article you can find on this stuff is right here: http://www.access-programmers.co.uk/...d.php?t=176968

  3. #3
    smikkelsen is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Mar 2010
    Posts
    60
    wow, this is actually exactly what I was talking about. Thank you so much for sending that link!

    I haven't had a chance to try any of it yet, but I will try to post my results if it works out.

    Thanks again.

  4. #4
    smikkelsen is offline Advanced Beginner
    Windows 7 Access 2007
    Join Date
    Mar 2010
    Posts
    60
    I successfully got my command button to open a new instance of IE, navigate to my login page, login, navigate to a specific page once logged in, and enter some data on that page and submit it.

    Everything on that site you gave me is simple enough. I wasn't expecting the dom to be so simple to use in VBA, the only thing I had to do was go into the vba tools>reverences, and turn on microsoft internet controls (for those who would like to do this) becasue that website did not explain that.

    One other helpful thing that is not on that website is for objects that do not have id's, but have names, you can use this:

    Code:
    ie.Document.getElementsByName("Email")(0).Value = user
    that example finds the first control in the html with name=email, and then puts the contents of variable "user" in.

    Hope that helps someone else out!

    Thanks again for the great link, it got me on a really good start.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Access 2003 code vs Access 2007 Code
    By ralphjramirez in forum Access
    Replies: 5
    Last Post: 11-23-2009, 12:33 PM
  2. Replies: 4
    Last Post: 05-12-2009, 01:50 PM
  3. 07 Switchbox Not Working! - please help
    By techexpressinc in forum Access
    Replies: 16
    Last Post: 05-05-2009, 09:36 AM
  4. Why isn't this working?
    By adiecidue in forum Queries
    Replies: 4
    Last Post: 04-27-2009, 10:29 AM
  5. Simple Nav Form Code Not Working
    By alsoto in forum Forms
    Replies: 10
    Last Post: 04-10-2009, 09:30 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums