PDA

Click to See Complete Forum and Search --> : Vb Com And Asp


leran
Jan 28th, 2001, 03:08 AM
Hello,
I wrote a VB COM using a reference to msword9.olb that should run under NT from ASP page.
I checked it, and it runs perfect outside ASP but when i try use it from ASP page it get stuck. Here is the code. Can anyone tell me where i do wrong?

1. Dim WordObj As Word.Application
2. Set WordObj = New Word.Application

3. WordObj.Documents.Open "Filename.doc"
etc...

It get stuck right after the line number 2( i.e. it can't create the object).

Should i use some init?

Please help me!!! This is very urgent!!!

Ianpbaker
Jan 28th, 2001, 06:10 AM
Hi leran

Has your web server got ms word installed ?.
This might be the cause of your problem

Also, I haven't tried using ole to something like word over asp before, and I'm not sure if you can actually do it. Might be wrong

Ian

Clunietp
Jan 28th, 2001, 12:49 PM
You can't use early binding in an ASP page, which what it looks like you are trying to do

try using late binding instead

example:

Dim WordObj
Set WordObj = Server.CreateObject("Word.Application")


I believe http://www.asptoday.com has an article or two on using MS Word/Excel from ASP, but their site is down today so I cannot provide a link for you. Check their site in a day or two

Ianpbaker
Jan 29th, 2001, 03:04 AM
Hi Clunietp

By the sound of it he's using a com dll, being accessed by asp, so what he had is right, if you can access word over IIS