Help in VB6; Generating HTML Pages

Discussion in 'Programming' started by hackmon, Nov 26, 2012.

  1. #1
    I was searching for a code to generate HTML from Visual Basic and I found This:
    Private Sub Form_Load()Dim strHTML As StringstrHTML = "This is the TitleThis is the body"Open "C:\Documents and Settings\All Users\Desktop\Sample.html" For Append As #1Print #1, strHTMLClose #1End Sub
    Code (markup):
    In above code HTML is Starting with " and with " but with the html codes with inverted commas in between it, it does not works. Please Help Me:)
     
    hackmon, Nov 26, 2012 IP
  2. hackmon

    hackmon Active Member

    Messages:
    83
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    61
    #2
    No one? :(
     
    hackmon, Nov 26, 2012 IP
  3. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #3
    HTML is pure text, so create the strings you want (the HTML) and write them to the file you want, the same way you'd create any other text file.

    (If you're looking for a way to have a program automatically put in headers, sections, tags, etc., you're going to end up with HTML that's even worse than the pure crap that Front Page produces.)
     
    Rukbat, Nov 27, 2012 IP
  4. hackmon

    hackmon Active Member

    Messages:
    83
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    61
    #4
    Ouch! I though of making a squeeze page generator
     
    hackmon, Dec 2, 2012 IP
  5. Rukbat

    Rukbat Well-Known Member

    Messages:
    2,908
    Likes Received:
    37
    Best Answers:
    51
    Trophy Points:
    125
    #5
    That would produce about the same level of code as Front Page - garbage.

    If you want to create web pages, learn how to create web pages. If you don't know how to do that, you aren't going to write a program to do it. (In order to write a program, you have to know how to do what you want the program to do.) It's like writing a book about something you know nothing about.
     
    Rukbat, Dec 2, 2012 IP