I think he was trying to convert static html to concatenation of the html as a string. I've used textpad, homesite and VID for this by creating a macro that replaces " with "", then another macro which adds strHTML = strHTML & " at the beginning of a line and " & vbcrlf to the end. These are pretty fast, done plenty of files this way.
tom mallard seattle -----Original Message----- From: Sam Thompson [mailto:[EMAIL PROTECTED]] Sent: Wednesday, September 25, 2002 6:03 AM To: ActiveServerPages Subject: Re: automatically formatting html files for asp why not just have a form field allowing the user to enter the name and have the rest of the html already in your ASP code? Cheers, Sam ----- Original Message ----- From: "jake williamson" <[EMAIL PROTECTED]> To: "ActiveServerPages" <[EMAIL PROTECTED]> Sent: Wednesday, September 25, 2002 1:31 PM Subject: automatically formatting html files for asp > hello! > > working on a html email project at the moment and i'm trying to automate > the conversion process from html document, into the format i need for my > asp script. > > what i need to write is a search and replace function (i think!) > > for example i need to turn: > > <html> > <head> > <title>test</title> > <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> > </head> > <body> > <table border="0" cellspacing="0" cellpadding="3"> > <tr> > <td>name</td> > </tr> > <tr> > <td>line two</td> > </tr> > <tr> > <td>line three</td> > </tr> > </table> > </body> > </html> > > into this: > > mailbody = "<html>" > mailbody = mailbody & "<html>" > mailbody = mailbody & "<head>" > mailbody = mailbody & "<title>test</title>" > mailbody = mailbody & "<meta http-equiv=""Content-Type"" > content=""text/html; charset=iso-8859-1"">" > mailbody = mailbody & "</head>" > mailbody = mailbody & "<body>" > mailbody = mailbody & "<table border=""0"" cellspacing=""0"" > cellpadding=""3""> > mailbody = mailbody & "<tr>" > mailbody = mailbody & "<td>name</td>" > mailbody = mailbody & "</tr>" > mailbody = mailbody & "<tr>" > mailbody = mailbody & "<td>line two</td>" > mailbody = mailbody & "</tr>" > mailbody = mailbody & "<tr>" > mailbody = mailbody & "<td>line three</td>" > mailbody = mailbody & "</tr>" > mailbody = mailbody & "</table>" > > so thats basically adding ' mailbody = " ' to the 1st line, ' mailbody = > mailbody & " ' to the start of the following lines and a ' " ' to then > end of the line. also andy ' " ' need to change to ' "" '. > > i will also need to feed areas of the html with dynamic data - for > example the text 'name' would have to be changed to: > > " & results.fields.item("FIRSTNAME").value & " > > so the line becomes: > > mailbody = mailbody & "<td>" & results.fields.item("FIRSTNAME").value & > "</td>" > > all very time consuming to do manually! > > i'm looking around and getting started on stuff but would be interested > if the list thinks this kind of thing is possible? what i'm thinking of > is a form page that asks you for an html document you want to convert, > which then points to the script which amends it, saves it and then > pass's the file name onto the email script as an include.... > > woooo!!! > > any thoughts would be grand, > > cheers, > > jake > > > --- > You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] > To unsubscribe send a blank email to %%email.unsub%% > --- You are currently subscribed to activeserverpages as: [EMAIL PROTECTED] To unsubscribe send a blank email to %%email.unsub%% --- You are currently subscribed to activeserverpages as: [email protected] To unsubscribe send a blank email to [EMAIL PROTECTED]
