Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

ActiveX Com can't create object in ASP

Status
Not open for further replies.

rodin

Programmer
Sep 18, 2002
2
MY
Can anybody help me? I'm using vbscript in my web page. I tried to open the word document and finally I got an error messages "ActiveX component can't create object".
 
try to check security options in your browser. By default IE doesn't allow to instanciate non signed activeX.
Menu "Tools/options" Tab "Security" Water is not bad as soon as it stays out human body ;-)
 
I still got the same error. Is the code wrong?

Below here is my sample code.


Sub Btn1_onclick()
call OpenDoc("d:\docfiles\browse.doc")
End Sub

Sub OpenDoc(strLocation)
Dim objWord

Set objWord = CreateObject("word.Application")
objWord.Visible = true
objWord.Documents.Open strLocation

End Sub

 
This script seems to be good. Is it client-side script (between <Script></Script> tags) or server-side (between <% ... %> tags) ?
Another hint (if you're SURE that it's not due to security options) : search your registery for &quot;word.application&quot; to see if it's in it and what exe correspond). Water is not bad as soon as it stays out human body ;-)
 
rodin,

If you are creating an Object in ASP then the Server requires Word to be installed on it. Its my guess from the error message that its not installed.

The Browser settings are irrelevant.

OR/

If the code is within Script tags i.e. running on the Client and NOT ASP then you need to enable

&quot;Initialiase and Script ActiveX Controls Not Marked as Safe&quot; in your Browser Security Settings.


Codefish
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top