DoughBoy
asked on
Please convert this to JSP
Hi All,
Could someone please convert the following VBScript/ASP code to JavaScript/JSP:
<%
...
<script language=vbscript>
Sub SendToWord
dim Obj , tObj , st2
set tObj = createobject("Word.Applica tion")
tObj.Visible = True
Set Obj = tObj.WordBasic
st2 = document.all.item("wordtex t").innerT EXT
Obj.FileNew
Obj.appmaximize 1
'obj.centerpara
obj.fontsize 8
obj.font "Courier New"
obj.insert st2
obj.font "Courier New"
End Sub
</script>
<script language=vbscript>
call SendToWord()
</script>
...
%>
TIA
DoughBoy
Could someone please convert the following VBScript/ASP code to JavaScript/JSP:
<%
...
<script language=vbscript>
Sub SendToWord
dim Obj , tObj , st2
set tObj = createobject("Word.Applica
tObj.Visible = True
Set Obj = tObj.WordBasic
st2 = document.all.item("wordtex
Obj.FileNew
Obj.appmaximize 1
'obj.centerpara
obj.fontsize 8
obj.font "Courier New"
obj.insert st2
obj.font "Courier New"
End Sub
</script>
<script language=vbscript>
call SendToWord()
</script>
...
%>
TIA
DoughBoy
This is going to be a project :-)
hold on, a closer look seems this is client side vbscript. jsp is server side programming. you cannot convert this kid of vbscript to jsp. but you can still use it in jsp page, isn't it? what's your problem?
ASKER
well, my goal is to have a jsp page open MS Word and send some text to it.
ASKER
Maybe Microsoft really does have better tools and languages than the others?
(ASP)
(ASP)
>> well, my goal is to have a jsp page open MS Word and send some text to it.
this is client side thing, it is nothing to do with jsp. your vbscript should continue to work as long as you convert rest of asp to the jsp.
this is client side thing, it is nothing to do with jsp. your vbscript should continue to work as long as you convert rest of asp to the jsp.
ASKER
Can VBScript be rendered from a Linux Server?
How would the code look if it was converted to JavaScript?
How would the code look if it was converted to JavaScript?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
there is another alternative, you can create a word doc at server side and send the word doc to client using poi:
http://jakarta.apache.org/poi/hwpf/
http://jakarta.apache.org/poi/hwpf/
ASKER
thanks for your help.
Merry Christmas
Merry Christmas
thanks for the A grade and Merry Christmas to you too.