从SHDocVw.InternetExplorer中回复HTML [英] Retrive HTML from SHDocVw.InternetExplorer

查看:178
本文介绍了从SHDocVw.InternetExplorer中回复HTML的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用下面的代码检索网页内容。

I am using code like below for retrieving webpage contents.

Dim ie As SHDocVw.InternetExplorer
Set ie = New SHDocVw.InternetExplorer
ie.Navigate "http://www.cnn.com"

然而,

ie.Document.body



似乎不包含页面的html文本。有人能告诉我一个直接获取html文本的简单方法吗?


Doesn't seem to contain the html text of the page. Could anyone tell me a no-nonsense and straightforward way to get the html text directly?

 

Bob

推荐答案

等待最后一次DocumentComplete事件,然后再访问该文件。您需要从后台导航线程中提取消息以显示事件。
Wait the last DocumentComplete event before accessing the document. You need to pump messages to have events raised from the background navigating thread.


这篇关于从SHDocVw.InternetExplorer中回复HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆