<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet type="text/xsl" href="RSS_xslt_style.asp" version="1.0" ?>
<rss version="2.0" xmlns:WebWizForums="https://syndication.webwiz.net/rss_namespace/">
 <channel>
  <title>Codejock Developer Community : WebBrowser</title>
  <link>http://forum.codejock.com/</link>
  <description><![CDATA[This is an XML content feed of; Codejock Developer Community : Controls : WebBrowser]]></description>
  <copyright>Copyright (c) 2006-2013 Web Wiz Forums - All Rights Reserved.</copyright>
  <pubDate>Wed, 13 May 2026 03:37:08 +0000</pubDate>
  <lastBuildDate>Tue, 17 Jul 2012 05:14:08 +0000</lastBuildDate>
  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
  <generator>Web Wiz Forums 12.04</generator>
  <ttl>360</ttl>
  <WebWizForums:feedURL>forum.codejock.com/RSS_post_feed.asp?TID=18417</WebWizForums:feedURL>
  <image>
   <title><![CDATA[Codejock Developer Community]]></title>
   <url>http://forum.codejock.com/forum_images/codejock-logo.gif</url>
   <link>http://forum.codejock.com/</link>
  </image>
  <item>
   <title><![CDATA[WebBrowser : Is it also possible so save the...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18417&amp;PID=68624&amp;title=webbrowser#68624</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=2660">McKloony</a><br /><strong>Subject:</strong> 18417<br /><strong>Posted:</strong> 17 July 2012 at 5:14am<br /><br />Is it also possible so save the content of a Webbrowser control als MHT or HTML File?]]>
   </description>
   <pubDate>Tue, 17 Jul 2012 05:14:08 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18417&amp;PID=68624&amp;title=webbrowser#68624</guid>
  </item> 
  <item>
   <title><![CDATA[WebBrowser : Steve, the easy answer is,Private...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18417&amp;PID=68465&amp;title=webbrowser#68465</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1401">jpcoffeyXXX</a><br /><strong>Subject:</strong> 18417<br /><strong>Posted:</strong> 19 June 2012 at 3:10pm<br /><br />Steve, the easy answer is,<br><br><pre><font color="#0000A0">Private Function</font> RetrieveFrameSelectedTextEasy<font color="#C00000">(</font>wb <font color="#0000A0">As</font> WebBrowser<font color="#C00000">)</font> <font color="#0000A0">As String</font>    <font color="#0000A0">Dim</font> oDoc <font color="#0000A0">As</font> HTMLDocument, tr <font color="#0000A0">As</font> IHTMLTxtRange    <font color="#0000A0">Set</font> oDoc = wb.Document    <font color="#0000A0">If LCase$</font><font color="#C00000">(</font>oDoc.selection.Type<font color="#C00000">)</font> = <font color="#008080">"text"</font> <font color="#0000A0">Then</font>        <font color="#0000A0">Set</font> tr = oDoc.selection.createRange        RetrieveFrameSelectedText = tr.Text        <font color="#0000A0">Set</font> tr = <font color="#0000A0">Nothing</font>    <font color="#0000A0">End If</font>    <font color="#0000A0">Set</font> oDoc = <font color="#0000A0">Nothing</font><font color="#0000A0">End Function</font></pre><br><br>However, in many cases, there are several iFrames on the page and you do not know which iFrame may have selected text.&nbsp; In this case you would need to use the following,<br><br><pre><font color="#0000A0">Private Function</font> RetrieveFrameSelectedText<font color="#C00000">(</font>wb <font color="#0000A0">As</font> WebBrowser<font color="#C00000">)</font> <font color="#0000A0">As String</font>    <font color="#0000A0">Dim</font> pContainer <font color="#0000A0">As</font> olelib.IOleContainer    <font color="#0000A0">Dim</font> pEnumerator <font color="#0000A0">As</font> olelib.IEnumUnknown    <font color="#0000A0">Dim</font> pUnk <font color="#0000A0">As</font> olelib.IUnknown    <font color="#0000A0">Dim</font> pBrowser <font color="#0000A0">As</font> shdocvw.IWebBrowser2    <font color="#008000">'======================================</font>    <font color="#0000A0">Dim</font> oDoc <font color="#0000A0">As</font> HTMLDocument    <font color="#0000A0">Dim</font> tr <font color="#0000A0">As</font> IHTMLTxtRange    RetrieveFrameSelectedText = vbNullString    <font color="#0000A0">Set</font> pContainer = wb.Document    <font color="#008000">' Get an enumerator for the frames</font>    <font color="#0000A0">If</font> pContainer.EnumObjects<font color="#C00000">(</font>OLECONTF_EMBEDDINGS, pEnumerator<font color="#C00000">)</font> = 0 <font color="#0000A0">Then</font>        <font color="#0000A0">Set</font> pContainer = <font color="#0000A0">Nothing</font>        <font color="#008000">' Enumerate all the frames</font>        <font color="#0000A0">Do While</font> pEnumerator.Next<font color="#C00000">(</font>1, pUnk<font color="#C00000">)</font> = 0            <font color="#0000A0">On Error Resume Next</font>   <font color="#008000">'JPC - Edanmo's error handler</font>            <font color="#008000">' Clear errors</font>            <font color="#0000A0">Err</font>.Clear            <font color="#008000">' Get the IWebBrowser2 interface</font>            <font color="#0000A0">Set</font> pBrowser = pUnk            <font color="#0000A0">If Err</font>.Number = 0 <font color="#0000A0">Then</font>                <font color="#0000A0">On Error GoTo</font> 0                <font color="#008000">'Debug.Print "Private Sub EnumFrames Frame URL: " &amp; pBrowser.LocationURL</font>                <font color="#0000A0">Set</font> oDoc = pBrowser.Document                <font color="#0000A0">If LCase$</font><font color="#C00000">(</font>oDoc.selection.Type<font color="#C00000">)</font> = <font color="#008080">"text"</font> <font color="#0000A0">Then</font>                    <font color="#0000A0">Set</font> tr = oDoc.selection.createRange                    RetrieveFrameSelectedText = tr.Text                    <font color="#0000A0">Set</font> tr = <font color="#0000A0">Nothing</font>                    <font color="#008000">'Don't look for anymore selected text</font>                    <font color="#0000A0">Exit Do</font>                <font color="#0000A0">End If</font>            <font color="#0000A0">End If</font>        <font color="#0000A0">Loop</font>        <font color="#0000A0">Set</font> oDoc = <font color="#0000A0">Nothing</font>        <font color="#0000A0">Set</font> pEnumerator = <font color="#0000A0">Nothing</font>    <font color="#0000A0">End If</font><font color="#0000A0">End Function<br><br><br><font color="#000000">It requires a reference to Edanmo's type library "OLELIB.TLB - OLE interfaces &amp; functions v1.7" at the top of the page at<br><br><a href="http://www.mvps.org/emorcillo/en/code/vb6/index.shtml" target="_blank">http://www.mvps.org/emorcillo/en/code/vb6/index.shtml</a><br><br>Hope this helps.<br><br>Sincerely,<br><br><br>John Coffey<br></font><br></font></pre><br><br><br><br>]]>
   </description>
   <pubDate>Tue, 19 Jun 2012 15:10:38 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18417&amp;PID=68465&amp;title=webbrowser#68465</guid>
  </item> 
  <item>
   <title><![CDATA[WebBrowser : Hi,Does anyone know how, within...]]></title>
   <link>http://forum.codejock.com/forum_posts.asp?TID=18417&amp;PID=64516&amp;title=webbrowser#64516</link>
   <description>
    <![CDATA[<strong>Author:</strong> <a href="http://forum.codejock.com/member_profile.asp?PF=1632">SteveStraley</a><br /><strong>Subject:</strong> 18417<br /><strong>Posted:</strong> 20 May 2011 at 8:20pm<br /><br />Hi,<br><br>Does anyone know how, within the AxWebBrowser control, to capture a selected section of text displayed within the control?<br><br>Thanks,<br><br>Steve<br>]]>
   </description>
   <pubDate>Fri, 20 May 2011 20:20:37 +0000</pubDate>
   <guid isPermaLink="true">http://forum.codejock.com/forum_posts.asp?TID=18417&amp;PID=64516&amp;title=webbrowser#64516</guid>
  </item> 
 </channel>
</rss>