Solved

How can i get the data and images in this website to a word file.With the enlarged images that we get when clicked on the image.

Posted on 2008-06-12
17
311 Views
Last Modified: 2008-06-15
Hi,

How can i get the data and images in this website to a word file.With the enlarged images that we get when clicked. Script to get this.
Any way to do this...
the website is below.
http://www.petenetlive.com/Tech/Windows/WDS/WDS.htm

This is not only the website i want this to be done.I have identical sites that i need to get them to word.
I dont want the data in the left colum but just the data and the images in an enlarged way to a word file.
Any word macro or a vbs script to do this.
Regards
Sharath
0
Comment
Question by:bsharath
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 11
  • 5
17 Comments
 

Expert Comment

by:Xetroximyn
ID: 21775991
Get yourself a google account.  

Get the google notebook plugin.  

Then highlight on each page the part that you want, and right click, and click "Note This (Google Notebook)"

This will stor each of these snippets in your google notebook as seperate notes, that could then be moved into seperate groups of notes if you wanted.  (or left as one huge group of notes.  

You can then click a link at the bottom of the page to export any group of notes to Google Docs, from there you can save as a word doc.  

If you are talking about a much larger scale, are you familiar with AutoIt?  You could probably write a script with in just a few hours, to do what you need while you watch. (provided you have a list of links or some methodical way to get from page to page)
0
 
LVL 65

Accepted Solution

by:
RobSampson earned 500 total points
ID: 21776260
Sharath, here is some code that will download all of the large images for you....as the script runs, you'll see the images get downloaded to the folder where the script is....

If you need me to, I can try to write a script that will put them all in a word doc for you.....

Regards,

Rob.
dteStart = Timer
' Fetch the file
Set objXMLHTTP = CreateObject("MSXML2.XMLHTTP")
 
For intImgNum = 1 To 90
	strURL = "http://www.petenetlive.com/Tech/Windows/WDS/wds/" & Right("000" & CStr(intImgNum), 4) & ".jpg"
	strLocalFile = Replace(WScript.ScriptFullName, WScript.ScriptName, "") & Mid(strURL, InStrRev(strURL, "/") + 1)
	
	objXMLHTTP.open "GET", strURL, False
	objXMLHTTP.send()
	
	If objXMLHTTP.Status = 200 Then
	      Set objADOStream = CreateObject("ADODB.Stream")
	      objADOStream.Open
	      objADOStream.Type = 1 'adTypeBinary
	      
	      objADOStream.Write objXMLHTTP.ResponseBody
	      objADOStream.Position = 0    'Set the stream position to the start
	      
	      Set objFSO = Createobject("Scripting.FileSystemObject")
	      If objFSO.Fileexists(strLocalFile) Then objFSO.DeleteFile strLocalFile
	      Set objFSO = Nothing
	      
	      objADOStream.SaveToFile strLocalFile
	      objADOStream.Close
	      Set objADOStream = Nothing
	End If
Next
 
Set objXMLHTTP = Nothing
 
dteEnd = Timer
 
MsgBox "Download complete." & VbCrLf & _
      "Source: " & strURL & VbCrLf & _
      "Target: " & strLocalFile & VbCrLf & _
      "Time taken: " & dteEnd - dteStart & " seconds."

Open in new window

0
 
LVL 11

Author Comment

by:bsharath
ID: 21776276
Perfect Rob...
Can you get the images to a work file.
If possible the data thats there in the website between the images
0
MS Dynamics Made Instantly Simpler

Make Your Microsoft Dynamics Investment Count  & Drastically Decrease Training Time by Providing Intuitive Step-By-Step WalkThru Tutorials.

 
LVL 11

Author Comment

by:bsharath
ID: 21776277
Perfect Rob...
Can you get the images to a work file.
If possible the data thats there in the website between the images
0
 
LVL 11

Author Comment

by:bsharath
ID: 21776288
Rob in what cases does this script work...
Like downloads any images or only small images that has a larger image tagged.?
0
 
LVL 11

Author Comment

by:bsharath
ID: 21776289
Rob in what cases does this script work...
Like downloads any images or only small images that has a larger image tagged.?
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 21776299
No, not exactly....in this script I have hard coded in the URL to the direct large image, and it just downlaods that file.....it will download any file that you hard code in....

Rob.
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 21776328
This script will add all of the images to a word document.  It is too hard for me to tell which text from the macro goes to which image......I think it would be faster for you to just cut and paste the text....

Regards,

Rob.
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objWord = CreateObject("Word.Application")
objWord.Visible = True
Set objDoc = objWord.Documents.Add
For Each objFile In objFSO.GetFolder(Replace(WScript.ScriptFullName, WScript.ScriptName, "")).Files
	If Right(LCase(objFile.Name), 4) = ".jpg" Then
		objWord.Selection.TypeParagraph
		objWord.Selection.TypeParagraph
		objWord.Selection.TypeParagraph
		objWord.Selection.InlineShapes.AddPicture objFile.Path, False, True
	End If
Next

Open in new window

0
 
LVL 11

Author Comment

by:bsharath
ID: 21776443
Thanks Rob workd perfect....
Have a Great week end..... :-))
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 21776457
No problem. You too.

See ya next week.

Rob.
0
 
LVL 11

Author Comment

by:bsharath
ID: 21776475
If time permits a look on the other post....
0
 
LVL 11

Author Comment

by:bsharath
ID: 21776476
If time permits a look on the other post....
0
 
LVL 11

Author Comment

by:bsharath
ID: 21776503
Rob for example if i need to get this down to a folder.

http://www.petri.co.il/active_directory_installation_requirements.htm
How should i mention the link in the script
0
 
LVL 11

Author Comment

by:bsharath
ID: 21776504
Rob for example if i need to get this down to a folder.

http://www.petri.co.il/active_directory_installation_requirements.htm
How should i mention the link in the script
0
 
LVL 65

Expert Comment

by:RobSampson
ID: 21776545
That would be a bit different....I'd need to code it more dynamically.....like the one we did with getting the emails from a page.....

I kinda cheated with this one, because it just so happened that they names the images all
xxxx.jpg

so it was easy to code....

If you like, I can probably spend some time modifying the emails script to do images instead...

Rob.
0
 
LVL 11

Author Comment

by:bsharath
ID: 21776552
Yes Rob please... I need this script for many different pages....
0
 
LVL 11

Author Comment

by:bsharath
ID: 21790870
Rob a new post for the extension of the same script...
http://www.experts-exchange.com/Programming/Languages/Visual_Basic/Q_23487129.html
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Active Directory replication delay is the cause to many problems.  Here is a super easy script to force Active Directory replication to all sites with by using an elevated PowerShell command prompt, and a tool to verify your changes.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

617 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question