• ActiveX component can’t create object.

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » ActiveX component can’t create object.

    • This topic has 5 replies, 2 voices, and was last updated 24 years ago.
    Author
    Topic
    #355560

    Hi,
    I have a code to open a fixed file in Word. It used to work very well before. But not after a Word-macro virus came to visit me once. Then the message came later.
    I think it has messed up with Word registry. It works well when I use the same process to call a Excel file. So I don’t think it has to do with DAO. I took the same db file to run on other computers, it turned out OK.
    I dealt with problem by re-install A97 and Word, but with no luck.
    I also registered DAO again. Nothing changed.
    Where should I look for the problem.

    For your further information, I have A97, Office 2000 including Access 2000 on W2K server.

    TIA.
    Tim K.

    Viewing 2 reply threads
    Author
    Replies
    • #524673

      Hi Tim,

      Can you post the part of the code that is not working? Also, is your database running in Access 97 or 2000?

      • #524675

        Hi Mark,
        It may sound ridicuous, but true.
        Here’s the code

        Sub CodeRunningOutsideWord()
        Dim wdApp As Word.Application
        Dim docNew As Word.Document

        ‘ Create new hidden instance of Word.
        Set wdApp = New Word.Application
        ‘ Create a new document.
        Set docNew = wdApp.Documents.Add
        ‘ Add text to document.
        wdApp.Selection.TypeText “Four score and seven years ago”
        ‘ Display document name and count of words, and then close
        ‘ document without saving changes.
        With docNew
        MsgBox “‘” & .Name & “‘ contains ” & .Words.Count & ” words.”
        .Close wdDoNotSaveChanges
        End With
        wdApp.Quit
        Set wdApp = Nothing
        End Sub

        The message error shows

        Run-time error ‘429’
        ActiveX component can’t create object.

        It stops at
        Set docNew = wdApp.Documents.Add

        It’s OK when I do the similar process to call Excel.

        Any idea?

        In the mean time, I am studying something at
        http://support.microsoft.com/support/kb/ar…s/Q244/2/64.ASP
        It seems very much like my problem.

        Thanks for your replies.

        Tim K.

      • #524676

        Hi Mark,
        I did try both. They stoped at the same line I mentioned below.

    • #524674

      Ahhhh – I should make a practice of reading the subject lines of the posts more often! I didn’t realize that you’re using an ActiveX control to do this…(are you?)
      If that’s the case, maybe it’s a problem with the control.

      Just a thought…

    • #524679

      Hello Mark,
      I have fixed the problem now after I studied the
      http://support.microsoft.com/support/kb/ar…s/q244/2/64.asp
      I followed the following paragraph:-
      …Re-register the application by typing the path to the server in the Start and then Run dialog box, and then append /RegServer to the end of the line. Press OK. This should silently run the application and re-register it as a COM server. If the problem is with a missing registry key, this will typically correct it….

      Just typed this
      “D:Program FilesAccess97OfficeWINWORD.EXE” /regserver
      in the Run command line. And It worked.

      Thanks for your help anyhow.

      Tim K.

    Viewing 2 reply threads
    Reply To: ActiveX component can’t create object.

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: