References screwed up.

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike MacSween

    References screwed up.

    I've done an Access app that does some Word automation. The code is long but
    the meat of it is:

    Sub testword()
    Dim wrdapp As Word.Applicatio n
    Set wrdapp = New Word.Applicatio n
    wrdapp.Visible = True
    End Sub

    Early binding, yes?

    This worked. Now it's producing:

    'Run-time error 48

    Error loading dll'

    I've tried many things:

    I reset the references. I imported all the objects into a new database. I
    created a completely new database with one form, one command button and the
    code above. I have progressively removed Office2003 beta, Office XP, Office
    2000, leaving myself with only Office 97 on the machine. Still the result
    above.

    This code used to work fine, now it doesn't. What I think I've done in the
    meantime is move my install of Office 2002. Office 97 and 2000 were in their
    own directories. But when I installed Office 2002 IIRC, it got installed as
    a sub directory in the 2000 directory. So I uninstalled and re-installed in
    it's own directory. My memory of the exact sequence is hazy. I may well have
    re-installed the Office 2003 beta too.

    A clue however is that over the last day that I've been trying to sort this
    out, quite often the only Word reference that is offered is one to Word 11
    (2003, yes), even after that version has been removed. I can browse to
    MSWord9.obj (or whatever its called) fine and mark it as a reference. But it
    doesn't work.

    It appears that whatever happens and _early binding_ reference to Word
    automation it trying to find the Word 11 library. And failing. I've always
    been able to start the appropriate version of Word itself, by the way, so
    presumably it's some dll which that calls. Infact if I open task manager
    there are often several versions of winword.exe running, all the failed
    attempts I guess.

    I'm guessing this is a registry thing. I've search the archives, MS site
    etc. Late binding works, and I know many will say that's what I should be
    using. Nevertheless I'd like this to work as it is, and not be forced into
    using late binding as a workaround. References to Excel work just fine,
    early binding too.

    Anybody got any clues?

    Yours, Mike MacSween


  • Cindy Meister  -WordMVP-

    #2
    Re: References screwed up.

    Hi Mike,

    I agree it's probably a screw up in the Registry. Have you done Run/Regedit
    and searched Word.Applicatio n? I might try that, deleting everything you
    come across (after installing all versions of Office), then try a reinstall.
    [color=blue]
    > It appears that whatever happens and _early binding_ reference to Word
    > automation it trying to find the Word 11 library. And failing. I've always
    > been able to start the appropriate version of Word itself, by the way, so
    > presumably it's some dll which that calls. Infact if I open task manager
    > there are often several versions of winword.exe running, all the failed
    > attempts I guess.
    >
    > I'm guessing this is a registry thing.
    >[/color]

    Cindy Meister
    INTER-Solutions, Switzerland
    http://homepage.swissonline.ch/cindymeister (last update Jan 24 2003)


    This reply is posted in the Newsgroup; please post any follow question or
    reply in the newsgroup and not by e-mail :-)

    Comment

    Working...