<% Option Explicit %> <html> <head> <title>ThaiCreate.Com ASP & Word.Application</title> </head> <body> <% Dim Wrd,DocName Set Wrd = CreateObject("Word.Application") Wrd.Application.Visible = False Wrd.Documents.Add() DocName = "MyDoc/MyWord.doc" With Wrd .Selection.PageSetup.LeftMargin = "0.25" .Selection.PageSetup.RightMargin = "0.25" .Selection.PageSetup.TopMargin = "0.25" .Selection.PageSetup.BottomMargin = "0.25" .Selection.TypeText "Welcome To www.ThaiCreate.Com" End With Wrd.ActiveDocument.SaveAs(Server.MapPath(DocName)) Wrd.Application.Quit Set Wrd = Nothing %> Word Created <a href="<%=DocName%>">Click here</a> to Download. </body> </html>
ช่วยกันสนับสนุนรักษาเว็บไซต์ความรู้แห่งนี้ไว้ด้วยการสนับสนุน Source Code 2.0 ของทีมงานไทยครีเอท