AYUDA POR FAVOR.Q hago mal???
Hola de nuevo. Tengo un problema y es que no se a que se puede deber. El caso es que desde visual llamo a un archivo para que se imprima y se imprime. El codigo es este:
Option Explicit
Private ScriptingContext As ScriptingContext
Private Application As Application
Private Request As Request
Private Response As Response
Private Server As Server
Private Session As Session
Public Sub OnStartPage(PassedScriptingContext As ScriptingContext)
Set ScriptingContext = PassedScriptingContext
Set Application = ScriptingContext.Application
Set Request = ScriptingContext.Request
Set Response = ScriptingContext.Response
Set Server = ScriptingContext.Server
Set Session = ScriptingContext.Session
End Sub
Public Sub OnEndPage()
Set ScriptingContext = Nothing
Set Application = Nothing
Set Request = Nothing
Set Response = Nothing
Set Server = Nothing
Set Session = Nothing
End Sub
Public Function prueba(obj)
Dim Documento As Word.Application
Set Documento = New Word.Application
With Documento
.Documents.Open "C:Documents and SettingsrootEscritorioIZASCRIccc.doc", False
.ActiveDocument.PrintOut
Printer.EndDoc
.ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
End With
End Function
Pues bien, este codigo lo quiero llamar desde ASP, por lo que convierto este codigo en una dll y la registro en "regsvr32". Des pues voy a la pagina ASP he intetno llamar a esta dll y a la funcion que hay en la misma con este codigo:
Set obj = Server.CreateObject("ASPTest.ASPTest")
call obj.prueba
Set obj = Nothing
Pero cuado ejecuto la pagina ASP, me da el siguiente error:
[color="#008000"]Objeto Server, ASP 0177 (0x800401F3)
ProgID no válido.
Alguien sabe a que puede ser debido? Estoy llamando mal a la dll? ALguien me puede dar una pista por favorrrrrrr. ES importante. Muchas graciasssssss
Option Explicit
Private ScriptingContext As ScriptingContext
Private Application As Application
Private Request As Request
Private Response As Response
Private Server As Server
Private Session As Session
Public Sub OnStartPage(PassedScriptingContext As ScriptingContext)
Set ScriptingContext = PassedScriptingContext
Set Application = ScriptingContext.Application
Set Request = ScriptingContext.Request
Set Response = ScriptingContext.Response
Set Server = ScriptingContext.Server
Set Session = ScriptingContext.Session
End Sub
Public Sub OnEndPage()
Set ScriptingContext = Nothing
Set Application = Nothing
Set Request = Nothing
Set Response = Nothing
Set Server = Nothing
Set Session = Nothing
End Sub
Public Function prueba(obj)
Dim Documento As Word.Application
Set Documento = New Word.Application
With Documento
.Documents.Open "C:Documents and SettingsrootEscritorioIZASCRIccc.doc", False
.ActiveDocument.PrintOut
Printer.EndDoc
.ActiveDocument.Close SaveChanges:=wdDoNotSaveChanges
End With
End Function
Pues bien, este codigo lo quiero llamar desde ASP, por lo que convierto este codigo en una dll y la registro en "regsvr32". Des pues voy a la pagina ASP he intetno llamar a esta dll y a la funcion que hay en la misma con este codigo:
Set obj = Server.CreateObject("ASPTest.ASPTest")
call obj.prueba
Set obj = Nothing
Pero cuado ejecuto la pagina ASP, me da el siguiente error:
[color="#008000"]Objeto Server, ASP 0177 (0x800401F3)
ProgID no válido.
Alguien sabe a que puede ser debido? Estoy llamando mal a la dll? ALguien me puede dar una pista por favorrrrrrr. ES importante. Muchas graciasssssss
