Hi forum,
I'm fairly new to VBA.
Scenario:
I'm using VBA and MSHTML library to extract an anchor text from the URL (back link). Let's say domain.com is linking to domain2.com, so, I'm using this to scan domain.com and see which anchor text it's using to link to domain2.com
Below is an extract from the code, which finds the anchor text which is used in the URL:
=======
=======HTML Code:
My question is: How do I go about a situation where I would like it to return an ALT attribute from a link which doesn't have an anchor but an ALT attribute instead; link format is the following:
<a href="domain2.com"><img src="(image location)" alt="ALTTEXT"/></a>
Basically I'm trying to get it to return ALTTEXT value instead or, even better, check if it has anchor and if not, then return ALTTEXT value.
Thanks.
Bookmarks