Results 1 to 4 of 4

Thread: Vb Com And Asp

  1. #1
    leran
    Guest

    Question

    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!!!


  2. #2
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    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


    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

  3. #3
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    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

  4. #4
    Fanatic Member Ianpbaker's Avatar
    Join Date
    Mar 2000
    Location
    Hastings
    Posts
    696
    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
    Yeah, well I'm gonna build my own lunar space lander! With blackjack aaaaannd Hookers! Actually, forget the space lander, and the blackjack. Ahhhh forget the whole thing!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width