-
Not able to get HTML text including formatting
Hi,
I am trying to use the following VBA code to get specifc text from a webpage.
While I am able to do that, I am not able to get the formatting info. The formatting used on the webpage is essential -e.g. the bolded part of the word. How can I acheive that?
[vba] ...
IE.navigate "http://dictionary.reference.com/browse/principle"
Do While IE.Busy: DoEvents: Loop
Set htmlDoc = IE.document
Set htmlColl = htmlDoc.getElementsByTagName("SPAN")
For Each hinput In htmlColl
If hinput.className = "pron" Then 'the pronouciation of the word
ocell.Offset(0, 1).Value = hinput.innerText
...[/vba]
Thanks,
MG.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules