Salve,
ho un problema con "IHTMLTxtRange txt = (IHTMLTxtRange)oHTMLDoc.selection.createRange();"

lo StreamReader sr mi rimane NULL,
se commento il Rigo "IHTMLTxtRange txt = (IHTMLTxtRange)oHTMLDoc.selection.createRange();" funziona!!!
oppure funziona pure se decommento il MessageBox sopra allo StreamReader, ma perche ???


codice:
using mshtml;
//--------
private IHTMLDocument2 oHTMLDoc;
//--------
oHTMLDoc = (IHTMLDocument2)this.nlrBrowser.Document.DomDocument;
oHTMLDoc.designMode = "On";

//MessageBox.Show("");

                        using (StreamReader sr = new StreamReader(sFilePath))
                        {
                            string sLine;
                            string sHTML = null;
                            string[] aTotLine = File.ReadAllLines(sFilePath);

                            IHTMLTxtRange txt = (IHTMLTxtRange)oHTMLDoc.selection.createRange();

                            while ((sLine = sr.ReadLine()) != null)
                            {
                                sHTML += sLine;
                            }

                            txt.pasteHTML(sHTML);
                        }