var HtmlString:String; TextRange : IHTMLTxtRange;begin TextRange := (Webbrowser1.document as ihtmldocument2).Selection.createRange as IHTMLTxtRange; HtmlString:=TextRange.HtmlText; //This will display selected part of the current page. WebBrowser1.navigate('about:'+HtmlString); end;
HtmlString:String;
TextRange : IHTMLTxtRange;begin
TextRange := (Webbrowser1.document as ihtmldocument2).Selection.createRange as IHTMLTxtRange;
HtmlString:=TextRange.HtmlText;
//This will display selected part of the current page.
WebBrowser1.navigate('about:'+HtmlString);
end;