Originally posted by: Somi
Run time error '438'
Set objDocument = objMSHTML.createDocumentFromUrl(txtURL.Text, vbNullString)
thanx
Hi,
the example was exactly what i was looking for but i keep getting this error when i run it:
Object doen't support this property or method,
at the following line :
Can you please help.
Somi.
Originally posted by: Manuel
Great example. I was looking for it and it was just in front of my eyes. Thanks a lot for saving me (us) a lot of stress and desperation.
Reply
Originally posted by: Ketan
I was looking for such a thing for soo long.. I always needed to instantiate a web control in order to do this..
Great job..
-Ketan
Originally posted by: David Brook
Thank you!
--David
I needed to parse out hyperlinks . . . this was definitely the ticket!
Originally posted by: Huynh Minh Triet
Thank you for your free help. It's a great example.
ReplyOriginally posted by: Tony Seale
Good example! Though for some bizarre reason the href property of HTMLLinkElement returns a NULL string even though there is data within it. I am using C# and can't seem to get at the process that is returning the href through VB's late binding.
Originally posted by: Brian
Exactly what I was looking for. Thanks.
Originally posted by: Brunner Andr�
Function fParseHtml(ByVal HtmlText As String) As String
Dim doc As New HTMLDocument
doc.designMode = "On" 'no script execution
doc.body.innerHTML = HtmlText
fParseHtml = retVal
Setting the design mode on prevents script execution and therefore there are no runtime scripting errors.
Dim element As Object
Dim retVal As String
Do While Not (doc.readyState = "complete") 'wait
DoEvents
Loop
For Each element In doc.body.All
...
Next
retVal = doc.body.innerHTML
Set doc = Nothing
Exit Function
End Function
Originally posted by: Bunty
What is this...i m expecting parsing not downloading
Reply
Originally posted by: Maurizio Butti
Try the following.
...
Private Sub objDocument_onreadystatechange()
Maurizio Butti
No need to make a doevents loop.
--8<--8<--8<--8<--8<--8<--8<--
Dim WithEvents objDocument As MSHTML.HTMLDocument
If objDocument.readyState = "completed" then
'end of download
End If
End Sub
--8<--8<--8<--8<--8<--8<--8<--