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
309 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
  • 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
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

There is an easy way, in .NET, to centralize the treatment of all unexpected errors. First of all, instead of launching the application directly in a Form, you need first to write a Sub called Main, in a module. Then, set the Startup Object to th…
In threads here at EE, each comment has a unique Identifier (ID). It is easy to get the full path for an ID via the right-click context menu. However, we often want to post a short link within a thread rather than the full link. This article shows a…
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

820 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