This is the discussion forum for the HtmlEditor. See also the
HtmlEditor home page, where you can download the control, and the
Documentation Wiki, a collaborative project for documenting the control.
Posted by: Scott
Date: Friday, 30-May-2008, 14:44:29
With the latest svn code, that does not use the Primary Interop, is it possible to get FindText working? I have:
public void FindText(string text)
IHTMLTxtRange txtRange = ((IHTMLBodyElement)HtmlDocument2.GetBody()).createTextRange();
bool found = false;
found = txtRange.findText(text, 0, 0);
in HtmlEditor and it throws a NullReferenceException on the txtRange.findText line. Strange exception I thought as neither txtRange nor text are null
Posted by: Tim
Date: Friday, 04-Jul-2008, 15:01:38
I tried this code using the version without the primary interop assembly (which is the one that is still under development) and it worked OK.
I had to amend the interface declaration for IHTMLTxtRange. I changed temp18 to this:
string theString,int count,int flags
Worth a try?