-
February 9th, 2012, 03:52 AM
#1
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!
Last edited by Bruin 1953; February 9th, 2012 at 03:58 AM.
-
February 9th, 2012, 11:40 AM
#2
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
-
February 9th, 2012, 09:31 PM
#3
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
-
February 10th, 2012, 06:19 PM
#4
Re: Please: How to copy text from webpage?
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
-
February 10th, 2012, 09:31 PM
#5
Re: Please: How to copy text from webpage?
Wouldn't count on that last post... or two...
-
February 17th, 2012, 03:45 PM
#6
Re: Please: How to copy text from webpage?
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!
-
February 17th, 2012, 03:52 PM
#7
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
Always use [code][/code] tags when posting code.
-
March 16th, 2012, 01:53 PM
#8
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
..
Last edited by Wario; March 16th, 2012 at 01:55 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|