Consultor Eletrônico



Kbase P6511: How to display Microsoft Word Document in Embedded SpeedScript
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   16/10/2008
Status: Unverified

GOAL:

How to display Microsoft Word Document in Embedded SpeedScript

FIX:

<META NAME="wsoptions" CONTENT="web-object,no-content-type">
<TITLE>MS Word</TITLE>

<SCRIPT LANGUAGE="Speedscript">

define variable cDocument as character no-undo.
define variable rLine as raw no-undo.
define stream sIn.

output-content-type( "application/msword":U ).

cDocument = "<path>document.doc".

input stream sIn from value(cDocument) binary no-echo no-convert no-map.

assign length(rLine) = 1024.

repeat:
import stream sIn unformatted rLine.
put {&WEBSTREAM} control rLine.
end.

length(rLine) = 0.
input stream sIn close.

</SCRIPT>