On Wed, 12 May 2004 15:10:24 +0100, "Anne Richmond"
<> wrote:
>I got the following code from a website somewhere. When I try to run it I
>get the error - Activex component can't create object "Word.Application".
>
>It is running on localhost and test2.doc does exist.
>
>What have I missed?
Is Word installed...?
The Office web components should also be installed for this method I
believe.
Jeff
><HTML>
><HEAD>
><SCRIPT LANGUAGE=VBScript>
>Dim objWord
>Sub Btn1_onclick()
>call OpenDoc("Test2.doc")
>End Sub
>Sub OpenDoc(strLocation)
>Set objWord = CreateObject("Word.Application")
>objWord.Visible = true
>objWord.Documents.Open strLocation
>End Sub
></SCRIPT>
><TITLE>Launch Word</Title>
></HEAD>
><BODY>
><INPUT TYPE=BUTTON NAME=Btn1 VALUE="Open Word Doc">
></BODY>
></HTML>
>