
VBScript invoking the Word 2000 Application
I'm writing a *.asp file using
VBScript and gets this error:
**********************************************************
Microsoft VBScript compilation error '800a0414'
Cannot use parentheses when calling a Sub
/ietesting.asp, line 55
***********************************************************
Since I'm calling the COM component of Word 2000, I must send the
"var1.ActiveDocuments.SaveAS" call with parameters to tell the object in
which case it shall save the file (ex. txt, csv, doc etc.)
Any help for how to go around this problem with parentheses inside Sub and
Functions would be very nice.
Below you can see some of the code i've used:
<HTML>
<BODY>
<SCRIPT Language=VBScript>
Sub test
Dim var1
Dim strLocation
Dim strLocation2
StrLocation = "ftp://filepath/filname.ext"
StrLocation2 = "ftp://filepath/filname2.ext"
Set var1 = CreateObject("Word.Application")
var1.Documents.Open strLocation
var1.ActiveDocuments.SaveAS(StrLocation2,False,False)
var1.Documents.Close
var1.Quit
End Sub
</SCRIPT>
</BODY>
</HTML>
Regards,
Lars Amlie