It is a word document and i am using progress 9.1E version and OS windows.
One more thing i am not recieving any error but document is not being displayed correctly.
I have the following code to open the document:-
<script language="speedscript">
DEFINE VARIABLE cFileName AS CHARACTER NO-UNDO.
DEFINE VARIABLE i_len AS INTEGER NO-UNDO.
DEFINE VARIABLE ra_rawdata AS RAW NO-UNDO.
DEFINE VARIABLE cTitle AS CHARACTER NO-UNDO.
IF request_method EQ "get" AND TRIM(get-value("document")) NE "":U THEN
DO:
ASSIGN cFileName = TRIM(get-value("document"))
cTitle = ENTRY(NUM-ENTRIES(cFileName, '/':U), cFileName, '/':U).
output-http-header("Pragma","No-Cache").
output-http-header("Cache-Control","No-Cache").
output-http-header("Expires","0").
output-http-header ("Content-disposition":U, "inline").
output-content-type ("application/msword":U).
END.
</script>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="
http://www.w3.org/1999/xhtml">
<head>
<title>`cTitle`</title>
<meta http-equiv="content-type" content="application/msword; charset=iso-8859-1">
</head>
<body>
<script language = "speedscript">
IF SEARCH(cFileName) <> ? THEN
DO:
INPUT FROM VALUE(cFileName) BINARY NO-ECHO NO-MAP NO-CONVERT.
SEEK INPUT TO 0.
REPEAT:
ASSIGN LENGTH (ra_rawdata) = 1024.
IMPORT UNFORMATTED ra_rawdata.
PUT {&WEBSTREAM} CONTROL ra_rawdata.
END.
ASSIGN LENGTH (ra_rawdata) = 0. /* Deallocate memory */
INPUT CLOSE.
RETURN ''.
END.
</script>
</body>
</html>
</script>