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
305 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

 
LVL 11

Author Comment

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

Expert Comment

by:RobSampson
Comment Utility
No problem. You too.

See ya next week.

Rob.
0
 
LVL 11

Author Comment

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

Author Comment

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

Author Comment

by:bsharath
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Yes Rob please... I need this script for many different pages....
0
 
LVL 11

Author Comment

by:bsharath
Comment Utility
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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
MsgBox 2 36
scripting, exchange 35 38
Microsoft Access combo box help 2 28
using web browser with BING 40 84
How to remove superseded packages in windows w60 or w61 installation media (.wim) or online system to prevent unnecessary space. w60 means Windows Vista or Windows Server 2008. w61 means Windows 7 or Windows Server 2008 R2. There are various …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
The viewer will learn additional member functions of the vector class. Specifically, the capacity and swap member functions will be introduced.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…

744 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now