PDA

Click to See Complete Forum and Search --> : Cut a page


sashabinkie
Mar 9th, 2001, 03:45 PM
We have a company sending us forms in html they are back to back pages <html> to </html> on one htm one htm that they sent is 13,731 lines of code. I wanted to parse out the final </html> tag to separate the forms. We would like to print each page (represented by the beginning and ending html tags) I borrowed the following code in VBScript:
Sub cmdCollect_OnClick()
On Error Resume Next
Set NewWindow = window.open("blank.htm")
NewWindow.document.write "<HTML><HEAD><TITLE>The all Collection</TITLE></HEAD><BODY>"
NewWindow.document.write "<H3>The all Collection</H3>"
For Each objItem In document.all
NewWindow.document.write objItem.tagName
NewWindow.document.write "<br>"
Next
NewWindow.document.write "<HR></BODY></HTML>"
NewWindow.document.close
End Sub

the output displays the start tags and not the end tags I have been searching most of the day through various sites to figure out how to reference the end tags and I can't come up with anything. Any suggestions??

Mar 10th, 2001, 07:02 AM
If I got it right, there is a begining <HTML> and a ending </HTML> for everything right, and that is what you want parsed? If so, why don't you go through you the right(strHTML, strlength-6) and the left(strlength-6) to take those out. You will then be left with the individual page <html> tags.