我需要制作一个VBA文件,它可以读取一个网页并返回IMG标签的SRC属性的值。我无法使最后一步工作。你们能帮我吗?
<html>
<body>
<img src="image.jpg">
</body>
</html>
===编辑=== 我成功返回了属性对象。现在需要返回它的值。
Option Compare Database
Sub AcessaPagina()
Dim ie As InternetExplorer
Dim test As String
Dim obj As Object
Set ie = New InternetExplorer
ie.Navigate "http://www.google.com.br"
MsgBox ie.Document.getElementsByTagName("img").Item(0).Attributes("src")
ie.Visible = True
End Sub
这是我目前拥有的内容。