The class mshtml.HTMLDocumentClass in Microsoft.mshtml.dll assembly has a method:
public virtual void write(params object[] psarray);
Avoiding
The declaration for the write method on the IHTMLDocument2 interface created by TLBIMP/VS.NET is incorrect. It should be:
void Write([In, MarshalAs(UnmanagedType.SafeArray)] object[] psarray);
You will have to define this interface in code and then use that.