<% 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.Font.Name = "Verdana" .Selection.Font.Size = "25" .Selection.Font.Bold = True .Selection.Font.Italic = True .Selection.TypeText "Welcome To www.ThaiCreate.Com" End With Wrd.ActiveDocument.BuiltInDocumentProperties("Title").Value = "Doc Title" Wrd.ActiveDocument.BuiltInDocumentProperties("Subject").Value = "Doc Subject" Wrd.ActiveDocument.BuiltInDocumentProperties("Author").Value = "Doc Author" Wrd.ActiveDocument.BuiltInDocumentProperties("Manager").Value = "Doc Manager" Wrd.ActiveDocument.BuiltInDocumentProperties("Company").Value = "Doc Company" Wrd.ActiveDocument.BuiltInDocumentProperties("Category").Value = "Doc Category" Wrd.ActiveDocument.BuiltInDocumentProperties("Application Name").Value = "Doc Application Name" Wrd.ActiveDocument.BuiltInDocumentProperties("Keywords").Value = "Doc Keywords" Wrd.ActiveDocument.BuiltInDocumentProperties("Comments").Value = "Doc Comments" 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 ของทีมงานไทยครีเอท