先創建一個表單,隨便存一個名字好了。
xxx.Html
<form action="Word_create.ASP">
Name: <input type="text" name="Name" size="50" maxlength="100">
Email: <input type="text" name="Email" size="50" maxlength="100">
Comments:
<textarea cols="50" rows="10" name="comments"></textarea>
<input type="submit" value="Submit">
</form>
處理表單的ASP程序
Word_create.ASP
<% Response.ContentType = "application/msWord" %>
<Html>
<% strName = Request.Querystring("Name")
strEmail = Request.Querystring("Email")
strComments = Request.Querystring("Comments")
%>
<head>
</head>
<body>
<p align="right"><%=formatdatetime(now,2)%></p>
親愛的 <%= strname %>:
我的EMAIL是: <%= stremail %>
我的內容是: <%= strComments %>
</body>
</Html>