-----Original Message-----
Using FP 2002, sp2, how can I force a user to download a
word document, and not open it directly in the browser
window?
Actually, this is fairly simple if your Web server is
Windows Server 2003 or has the .NET Framework installed.
In that case, add a Web page containing these statements
to your Web:
<html>
<head>
<title>Download</title>
</head>
<body>
<%
Response.Clear()
Response.ContentType = "application/x-data"
Response.AddHeader("content-disposition", _
"attachment; filename=test.doc")
Response.WriteFile(Server.MapPath("test.doc"))
Response.End()
%>
</body>
</html>
Just above the blank line, test.doc specifies the default
file name that will appear in the visitor's download
dialog box.
Just below the blank line, test.doc specifies the
relative path and filename (on the Web server) of the
file you want to download.
Be sure to save this Web page with a filename extension
of .aspx rather than .asp.
Life isn't so good if your Web server can only run ASP
pages. This is because in ASP, the Response.WriteFile
method isn't available. In this case you must either:
o Zip up your file, as others have suggested.
o Build an ordinary link to your .doc file, then tell
your visitors to right-click that link and choose
Save Target As from the shortcut menu.
Jim Buyens
Microsoft FrontPage MVP
(e-mail address removed)
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| Faster Smarter Beginning Programming ||
|| (All from Microsoft Press) ||
|/----------------------------------------------------\|
*------------------------------------------------------*