Absolutely, that's what everything is about. Import your solution into VS2010, Project + Properties, Application tab, change Target Framework to .NET 4.0. Open the Links node in the Solution Explorer window, select the Microsoft.mshtml link and set the Paste Interaction Type property to True. It automatically turns on for new projects focused on 4.0
This works for any COM type library selected on the COM tab, as well as any PIA selected on the .NET tab. A type library is only required at build time; you no longer need to deploy interop or PIA libraries. The actual COM server should, of course, still be present on the target machine.
The new dynamic keyword and the optional named argument functions are not connected, they simply simplify writing cleaner code when working with COM servers that were designed to work with scripting languages. Mshtml is already pretty clean, Office interop is a good example.
Also note that it is easy to avoid mshtml dependencies when using the Windows Forms HtmlDocument and HtmlElement classes. This begins by using the WebBrowser.Document property. However, they do not wrap all mshtml functions.
source share