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
306 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
 
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
3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

 
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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
allswap challenge 6 79
Groovy:unable to resolve class error 2 70
A script to extract the important data and calculate if the amounts are correct 12 58
React or Angular? 6 53
Batch, VBS, and scripts in general are incredibly useful for repetitive tasks.  Some tasks can take a while to complete and it can be annoying to check back only to discover that your script finished 5 minutes ago.  Some scripts may complete nearly …
Having just graduated from college and entered the workforce, I don’t find myself always using the tools and programs I grew accustomed to over the past four years. However, there is one program I continually find myself reverting back to…R.   So …
The goal of the video will be to teach the user the difference and consequence of passing data by value vs passing data by reference in C++. An example of passing data by value as well as an example of passing data by reference will be be given. Bot…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

895 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

16 Experts available now in Live!

Get 1:1 Help Now