Creating a Word document from a web page

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
 
C

clintonG

This type of development is more likely to be discussed in
an office.developer newsgroup. Meanwhile...

[1] Google: "rich text format"+"microsoft office"
[2] Google: "rich text format"+"microsoft office"+"asp.net"
 
G

Guest

Thanks anyway - I'll go and try elsewhere :)

Peter
-----Original Message-----
This type of development is more likely to be discussed in
an office.developer newsgroup. Meanwhile...

[1] Google: "rich text format"+"microsoft office"
[2] Google: "rich text format"+"microsoft office"+"asp.net"

--
<%= Clinton Gallagher, "Twice the Results -- Half the Cost"
Architectural & e-Business Consulting -- Software Development
NET [email protected]
URL http://www.metromilwaukee.com/clintongallagher/



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


.
 
Top