P
PeterL
Hi,
I want to use FP 2003 as a tool to build a document
management process. In particular I want to be able to
create a word document from a button click on a web page.
I have tried inserting a VBscript section into the code,
that is called by on onclick event. However, I
continuously come up against "compile" errors and
VBscript objects that are not recognised. FP seems to
have trouble switching between Jscript and VBScript,
although the script sections are well demarcated.
Unfortunately I'm not familiar enough with Javascript to
write a routine/applet that can open/create a word
document.
This is kind of the approach I've been using up to now:
<script language="vbscript">
<!--
function opentr()
'Dim oWord As Variant
'Dim rep_tmplt as String
rep_tmplt = "C:/file.dot"
Set oWord = CreateObject("word.application")
With oWord
.Visible = True
.Activate
.documents.Add template:=rep_tmplt,
NewTemplate:=False, DocumentType:=0, Visible:=True
End With
End function
-->
</script>
When activated I get run time error "Object not found"
Does anyone have a script I can use to overcome this
problem? Any help would be appreciated.
Peter
I want to use FP 2003 as a tool to build a document
management process. In particular I want to be able to
create a word document from a button click on a web page.
I have tried inserting a VBscript section into the code,
that is called by on onclick event. However, I
continuously come up against "compile" errors and
VBscript objects that are not recognised. FP seems to
have trouble switching between Jscript and VBScript,
although the script sections are well demarcated.
Unfortunately I'm not familiar enough with Javascript to
write a routine/applet that can open/create a word
document.
This is kind of the approach I've been using up to now:
<script language="vbscript">
<!--
function opentr()
'Dim oWord As Variant
'Dim rep_tmplt as String
rep_tmplt = "C:/file.dot"
Set oWord = CreateObject("word.application")
With oWord
.Visible = True
.Activate
.documents.Add template:=rep_tmplt,
NewTemplate:=False, DocumentType:=0, Visible:=True
End With
End function
-->
</script>
When activated I get run time error "Object not found"
Does anyone have a script I can use to overcome this
problem? Any help would be appreciated.
Peter