|
-
Aug 11th, 2012, 02:34 AM
#8
Re: Access OO > Internet Explorer
Am I missing some useful references?
no references required, but if you reference html, you can use the intellisense, if you declare your variables correctly
When you use the shell you don't seem to get any of the internetexplorer objects/methods.
just needs a little more patience to work out where the objects are
this works correctly, without error, i opened the webpage you linked to above in ie
Code:
Dim doc As HTMLDocument ' reference to html required
Set sh = CreateObject("shell.application")
Set w = sh.Windows(sh.Windows.Count - 1) ' as i only have 1 instance of ie open, it has to be the last window
'Debug.Print w.document.documentelement.innerhtml
Set doc = w.document
intellisense will work for doc as it is declared and referenced
use the locals window to find what elements can be used
shows correct result
So I am going to have to force the user to open an IE from my MDb first then hold the reference to it.
you can do everything from the shell window
you can also reference shell automation, but beyond getting the correct window it will not help you much
Last edited by westconn1; Aug 11th, 2012 at 02:39 AM.
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|