Questions tagged [mshtml]

MSHTML was introduced in Microsoft Internet Explorer 4.0. It is the main HTML component of the Internet Explorer browser and can be used in other applications. It hosts Microsoft ActiveX Controls and supports the OLE Control '96 (OC96) specification for windowless controls.

MSHTML frequently comes into play when a WPF or WinForms application hosts a web browser control. To access MSHTML, the 'Add Reference' dialog is used as shown in the figure below...

Locating the MSHTML assembly

Reference articles for MSHTML can be found here

444 questions
5
votes
1 answer

Access elements inside html tag source html using VB.Net

I’m using SHDocVw.InternetExplorer APIs in my Vb.Net WinForms application to fetch elements from Internet Explorer. I can easily access the elements inside parent document and frame elements but I am not able to access the elements inside the…
prem
  • 3,348
  • 1
  • 25
  • 57
5
votes
1 answer

Get current style using MSHTML in C#

I want to use MSHTML to get the style of an html element. What I want is the computed style but without all the default values. (only the ones that are set in the html and css) MSHTML has 3 types of styles that I have seen so far style,…
Sruly
  • 10,200
  • 6
  • 34
  • 39
5
votes
1 answer

mshtml.dll version is 8.0 and Microsoft.mshtml is 7.0

I'm a little confuse and maybe you can help me. I've the mshtml.dll (version 8.0) and the Microsoft.mshtml.dll (version 7.0) If I go to add a reference to my WPF project and try to add the mshtml.dll, it tells me that the reference has to be a valid…
Jayson
  • 51
  • 3
5
votes
3 answers

mshtml.HTMLDocument how to hide a dynamically created div with class attribute

I am trying to load a load a Webpage in C# WebBrowser control (WPF not WinForm). Along with other content the page has a image rotator that Dynamically creates two divs having same class to utilize the image rotating. In the LoadComplete event of…
marifrahman
  • 681
  • 2
  • 13
  • 31
5
votes
1 answer

mshtml.HTMLTableCell has Incorrect innerText value

When I try to parse HTMLTableCell the innerText value is incorrect and it seem that I'm getting the class name instead of the text. Now the strange thing is that when I look at the cell (in VS2010) in debug I see the proper value what am I doing…
Roey Nissim
  • 555
  • 8
  • 25
5
votes
0 answers

ExecCommand CreateLink and IMG

I use webbrowser-control (MSHTML Edit) in design mode. When I try to insert a hyperlink for a selected text it works fine. But when I try to insert a hyperlink for a selected picture I got the error: Error 100 Function expected Code: var pCmd :…
5
votes
4 answers

getElementById on element within an iframe

My current code works on elements outside of an iframe. How should I approach fetching elements within an iframe using getElementById? My end goal is to write text within the the

...

tags. I am not using a webBrowser…
Patrick Alexson
  • 153
  • 1
  • 4
  • 13
5
votes
1 answer

I need to find and press a button on a webpage using VBA

I have written a macro that will open a webpage, find the spots I need to put the data into, and then I want the macro to hit a prefill button, then hit Ok. The page source code for the button is:
Michaeljwjr
  • 423
  • 4
  • 7
  • 13
5
votes
1 answer

how to get an IHTMLElementCollection obj which composed of several IHTMLElements?

guys: I got a problem about "how to get an IHTMLElementCollection obj which composed of several IHTMLElements" in object-pascal programming , my codes below: function TExDomUtils.GetElementsByClassName(vDoc:IHTMLDocument3;…
MarcoLin
  • 53
  • 1
  • 4
4
votes
1 answer

Parse html file using MSHTML in VBScript

I'd like to load a string as an html file using MSHTML in VBScript and parse it. I can do this with "InternetExplorer.application" but I'd like to do it with "htmlfile" (MSHTML.HTMLDocument) The following code: Set h = …
Eugene
  • 10,957
  • 20
  • 69
  • 97
4
votes
3 answers

MSHTML fallback for data uri:s

My site uses data uri:s to reduce the number of HTTP requests to my site. The problem is that data uri:s don't work in IE7, a browser that we have to support (No, we don't need IE6). I've followed Stoyan's guide and actually gotten it to work, but…
Emil Stenström
  • 13,329
  • 8
  • 53
  • 75
4
votes
2 answers

problem with IHTMLDocument2::write()

I am trying to create an mshtml document object from an html buffer. But when the following code is executed it is invoking internet explorer window. How do I prevent it invoking IE. #include #include…
Shino C G
  • 1,237
  • 11
  • 17
4
votes
1 answer

MSHTML.dll - How to ensure consistent version of IE rendering engine is used across install machines

I'm a bit confused by what I'm reading on line regarding redistribution of MSHTML.dll. My application (this is a consumer data extraction tool) makes use of the WebBrowserControl in a WebForms app (might end up being WPF), and relies on…
gbro3n
  • 6,729
  • 9
  • 59
  • 100
4
votes
1 answer

What are the currently supported CSS selectors available to VBA?

Back on May 19th 2021, I wrote this Q&A regarding recent (Apr-May-21) suspected changes to an interface in relation to mshtml.dll and late bound referencing. This is a part 2, if you will. Previously, in questions such as this and this, I have…
QHarr
  • 83,427
  • 12
  • 54
  • 101
4
votes
1 answer

How to hold a reference to the items matched by `querySelectorAll`, in a variable, that allows you to access its methods?

Intro: Some of you may have noticed that something has broken in relation to the querySelectorAll method of MSHTML.HTMLDocument from MSHTML.Dll (via a Microsoft HTML Document Library reference). This, I believe, has happened in the last month. It…
QHarr
  • 83,427
  • 12
  • 54
  • 101
1 2
3
29 30