Results 1 to 4 of 4
  1. #1
    New Lounger
    Join Date
    May 2003
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Automation trouble on object creation (Excel/Word 2003)

    I made a macro in Excel which nicely take some rows in a list, create a Word document based on a template, and inserts the rows as a Word-table in the Word document. I tested it in a 2000 environment and XP environment - both with success.
    At my 2003 environment trouble starts. When I try to run the code

    Dim objWord As Word.Application
    Set objWord = CreateObject("Word.Application")

    I get the error message: Run-time error '-2147024770' (8007007e) Automation error.
    After som hours googling I just don't get any closer.
    Early binding of objWord doesn't help either. I suggest it is some kind of OLE-trouble, but I don't know where to start looking.

    (Before I got the 8007007e-error I got an 80040111 error, which disappeared when uninstalling Norton AV)

    Do you have any idea what causes this error?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 18 Times in 18 Posts

    Re: Automation trouble on object creation (Excel/Word 2003)

    Does the following work?

    Set objWord = CreateObject("Word.Application", "localhost")

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Automation trouble on object creation (Excel/W

    What do you get if you try this?

    Dim objWord As New Word.Application

    (New doesn't work with all objects, but it often works with "top level" objects.)

  4. #4
    New Lounger
    Join Date
    May 2003
    Posts
    10
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Automation trouble on object creation (Excel/W

    I'll try HansV's suggestion when I get home.
    I've tried using the keyword New, (early binding, isn't it?). It works just as bad as without, but at least I didn't get another error message :-)

Posting Permissions

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