How to use MSHTML in VB.NET?

In response to question # 56107, Erlend provided this C # code example:

using mshtml;
...
object[] oPageText = { html };
HTMLDocument doc = new HTMLDocumentClass();
IHTMLDocument2 doc2 = (IHTMLDocument2)doc;
doc2.write(oPageText);

I would like to use mshtml in VB.NET, but the IDE does not recognize this:

Imports mshtml

What additional steps need to be taken to use MSHTML in VB.NET?

+3
source share
1 answer

Found the answer to my question:

MSHTML in ASP.NET

If you're interested, here is a VB.NET-based solution that you can use with ASP.NET (.aspx.vb). Make sure you add the link to Microsoft.mshtml from .NET. object collections and "Imports System.Runtime.InteropServices"

, " " COM, .NET. Microsoft HTML Object Library.

+12

Source: https://habr.com/ru/post/1703232/


All Articles