In an application, I am using
Dim oHTML_Element As mshtml.IHTMLElement
Dim HTMLDoc As mshtml.HTMLDocument
HTMLDoc = CType(oBrowser.Document, mshtml.HTMLDocument)
'//mimtype = "Microsoft Office Excel 97-2003 Worksheet"
For Each oHTML_Element In HTMLDoc.getElementsByTagName("a")
If oHTML_Element.getAttribute("mimetype") is Nothing then
MsgBox ("NONE FOUND")
Ok! I think I finally figured it out!
The culprit here is the
mimeType. On my machine, I have MS Office 2010 installed whereas on my friend's machine he has Office 365.
Inside my C# code, I was searching for
mimeType = "Microsoft Office Excel 97-2003 Worksheet" within
mshtml.HTMLDocument and it worked fine. Now, searching for the same
mimeType on the webpage rendered on my friend's machine yielded
None. The problem was that
XLS gets a
mimeType = "Microsoft Excel 97-2003 Worksheet" when a machine has Office 365 and
mimeType = "Microsoft Office Excel 97-2003 Worksheet" for older versions of Office.