IE Automation with VBA (1 Viewer)

abbaddon223

Registered User.
Local time
Today, 12:27
Joined
Mar 13, 2010
Messages
162
Hi Experts - I'm hoping someone can kindly help me please?

I have form with two fields:

Email
Result

I use the following code to open a web page and check if the domain is valid:

Dim ie As Object
Set ie = CreateObject("internetexplorer.Application")
ie.Visible = True

Dim URLSTART As String
URLSTART = "http://check.maxomail.com/?"

Dim URLEND As String
URLEND =

ie.Navigate URLSTART & URLEND

This gives me a single unformatted page result like the below

1. Good

Usually I would get the value from the page by referencing the ElementID. The problem herin is, there is no ID.

Has anyone got any ideas how I can get the value from the page back into the [Result] field?

Thank you for any help.

Phil.
 

JHB

Have been here a while
Local time
Today, 21:27
Joined
Jun 17, 2012
Messages
7,732
...
This gives me a single unformatted page result like the below

1. Good
It is what you see, what is the HTML content behind the result page, (the Source code for the page)?
 

JHB

Have been here a while
Local time
Today, 21:27
Joined
Jun 17, 2012
Messages
7,732
Try the below code, it gives you what you see in the attached picture.
Code:
  Dim ie As New InternetExplorer
  ie.Navigate "http://check.maxomail.com/?test@somedomain.com"
  Do
    DoEvents
  Loop Until ie.ReadyState = READYSTATE_COMPLETE
  MsgBox (ie.Document.DocumentElement.innerText)
 

Attachments

  • Bad.jpg
    Bad.jpg
    7.8 KB · Views: 170

abbaddon223

Registered User.
Local time
Today, 12:27
Joined
Mar 13, 2010
Messages
162
Yep - did the trick. That's excellent and thank you for your help
 

Users who are viewing this thread

Top Bottom