< %
const lie = 3 'ubah jumlah kolom
const tableWidth = 33% 'Tentukan lebar formulir
Const tableHeight = 18% 'Tentukan ketinggian tabel
Const imgwidth = 15% 'Tentukan lebar tabel
const imgheight = 27,5% 'Tentukan ketinggian tabel
Const FontSize = 12px; 'Tentukan ukuran teks
const txtwidth = 120 'gambar lebar tabel teks kanan
const txtheight = 18% 'gambar tabel teks kanan tinggi
const txtalign = Metode perataan teks kanan gambar kanan: kiri, di tengah, kanan kanan
'Top menekankan bahwa file tersebut adalah file Word
Fungsi Doctop ()
DOCTOP = <html xmlns: v = urn: schemas-microsoft-com: vml xmlns: o = urn: schemas-microsoft-com: kantor: w = urn: schmas- microsoft-com: kantor: word xmlns = http: // www.w3.org/tr/rec- html40> <adept> <title> Hasil Hasil </itement> <meta http-equiv = konten-tipe konten = teks/html; > </meta> </meta> </meta> <meta name = progid content = word.document> </meta> <meta name = content genator = microsoft word 10> </meta> <meta name = originator konten = Microsoft Word 10> <style type = text/css>@ page section1 {margin: 30pt 8.5pt 5.65pt 12pt;} div.section1 {page: section1;} tabel {font-size: & fontSize &} </meta> /head>+chr (13)+chr (10)
fungsi akhir
Fungsi imgtotable (fto, fpar, dext)
Imgtotable = <tabel lebar = & tableWidth & height = & tableHeight & border = 0>
Imgtotable = imgtotable+<tr valign = top> <td> <img src = & ganti (demo, fpar,) & lebar = & imgwidth & height = & imageighryigh &//> </td>
Imgtotable = imgtotable+<td colspan = 2 align = center>
Imgtotable = imgtotable+<tabel width = & txtwidtht & height = & txtheight &> <td align = & txtalign &> ganti (fto.name),. Td align = & txtAlign &> aktor </td> </tr> <lign = & txtalign &> bahasa </td> </tr> <td align = & txtalign &> kapasitas </td> </tr> ter> <td align = & txtAlign &> ketik </td> </tr> </able>
imgtotable = imgtotable+</td> </tr> </able>+chr (13)+chr (10)
fungsi akhir
Function ImageTodoc (FPath, FPAR)
atur fto = fso.createTextFile (fpath &/run results.doc, true)
fto.writeLine doctop ()
fto.writeLine <body topmargin = 0 leftmargin = 0> <lebar tabel = 64 tinggi = 100% batas = 1> <div class = bagian1>
Untuk setiap demo di fpath.files
dext = lcase (fso.getextensionName (demo))
Jika dext = jpg atau deb = gif atau dext = png maka
if (i mod lie) = 0 lalu fto.writeLine <tr>+chr (13)+chr (10)
I = i+1
fto.writeLine <td>
'Digunakan untuk kesalahan
'FTO.WriteLine 123
Fto.writeLine imgtotable (demo, fpar, dext)
fto.writeLine </td>+chr (13)+chr (10)
if (i mod lie) = 0 lalu i = 0: fto.writeLine </tr>+chr (13)+chr (10)
akhiri jika
Berikutnya
fto.close
response.write </div> </able> </body>
Response.Write & FAO & FPATH &/RUN/RUN DOC. <br />
atur fto = tidak ada
fungsi akhir
atur fso = server.createObject (scripting.filesystemObject)
set fo = fso.getFolder (server.mappath (./)))
Untuk setiap demo di fpo.subfolders
Hubungi ImageTodoc (Demo,)
Berikutnya
Setel fo = tidak ada
atur fso = tidak ada
%>