How to get the html source from an explorer window knowing only the window handle via vb 6?

The exact question I needed an answer for was already in the forum.

How to get the html source from an explorer window knowing only the window handle - programaticlly??

However, the link to the answer does not work.  Could you post the answer back in the forum?

thanks,
bch
bch3000Asked:
Who is Participating?

Improve company productivity with a Business Account.Sign Up

x
 
bobbit31Connect With a Mentor Commented:
Dim shWindows           As New SHDocVw.ShellWindows
Dim tmpExplorer               As SHDocVw.InternetExplorer
 
For Each tmpExplorer In shWindows
   if tmpExplorer.HWND = <handle> then
     msgbox tmpExplorer.document.body.innerHTML
     exit for
   end if
Next

0
 
bobbit31Commented:
you'll need to add "Microsoft Internet Controls" under project/references
0
 
bobbit31Commented:
gimme points
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.