Please: How to copy text from webpage?
Pls show me How to copy text from any given webpage to thee ClipBoard.
I now open the page manually and SelectAll - Copy data from File menu, but would like my program to do the copyin
Saving text, or the webpage itself, to a text file would also do.
My form already include WebBrowser1 control, but I have little idea how to use it!
Re: Please: How to copy text from webpage?
If you search this forum, for webbrowser, I'm sure you can get info quicker than all of us typing our posts, AGAIN. Another keyword is DOM.
Specify which version of the OS and browser, though. They're different
Re: Please: How to copy text from webpage?
This will get you the text of the web site cant remember how to paste into clipboard
strURL = "http://www.forexfactory.com"
Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")
objXMLHTTP.Open "GET", strURL, False
objXMLHTTP.Send ""
strHTML = objXMLHTTP.ResponseText ' strHTML will contain the text of website strURL
Re: Please: How to copy text from webpage?
Quote:
Originally Posted by
tgacomp
This will get you the text of the web site cant remember how to paste into clipboard
strURL = "http://www.forexfactory.com"
Set objXMLHTTP = CreateObject("MSXML2.ServerXMLHTTP")
objXMLHTTP.Open "GET", strURL, False
objXMLHTTP.Send ""
strHTML = objXMLHTTP.ResponseText ' strHTML will contain the text of website strURL
Great! Thanks
Re: Please: How to copy text from webpage?
Wouldn't count on that last post... or two...
Re: Please: How to copy text from webpage?
Quote:
Originally Posted by
dglienna
Wouldn't count on that last post... or two...
You are probably right!
I thought I tried it and it worked, but I am finding out that this code return HTML in the page, not the textual data itself.
So, my request is on!
Re: Please: How to copy text from webpage?
You could always use the send keys method
ctrl a to select all
ctrl c to copy to clipboard
Re: Please: How to copy text from webpage?
Clipboard.SetText(myvar)
This should place the text from myvar to the clipboard.
Check this:
http://msdn.microsoft.com/en-us/library/tbfb3z56.aspx
..