Results 1 to 6 of 6
  1. #1
    Lounger
    Join Date
    Apr 2001
    Location
    Khon Kaen, Thailand
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    ActiveX component can't create object.

    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.

  2. #2
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ActiveX component can't create object.

    Hi Tim,

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

  3. #3
    Silver Lounger
    Join Date
    Jan 2001
    Location
    Indianapolis, Indiana, USA
    Posts
    1,862
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ActiveX component can't create object.

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

  4. #4
    Lounger
    Join Date
    Apr 2001
    Location
    Khon Kaen, Thailand
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ActiveX component can't create object.

    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
    <A target="_blank" HREF=http://support.microsoft.com/support/kb/articles/Q244/2/64.ASP>http://support.microsoft.com/support/kb/ar...s/Q244/2/64.ASP</A>
    It seems very much like my problem.

    Thanks for your replies.

    Tim K.

  5. #5
    Lounger
    Join Date
    Apr 2001
    Location
    Khon Kaen, Thailand
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: ActiveX component can't create object.

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

  6. #6
    Lounger
    Join Date
    Apr 2001
    Location
    Khon Kaen, Thailand
    Posts
    43
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I fixed it!

    Hello Mark,
    I have fixed the problem now after I studied the
    <A target="_blank" HREF=http://support.microsoft.com/support/kb/articles/q244/2/64.asp>http://support.microsoft.com/support/kb/ar...s/q244/2/64.asp</A>
    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.

Posting Permissions

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