Results 1 to 2 of 2

Thread: Cut a page

  1. #1
    sashabinkie
    Guest
    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??

  2. #2
    Guest
    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width