Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Jul 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Microsoft Access Launching Microsoft Word Crash (Office 2000)

    I have a DB in access that uses VB on a button in a form to open a word object and then carry out a find and replace on the text in the word document based on presetup strings. I have Visual Studio installed and it runs very well but when I try to run it on exactly the same machine with no Visual Studio MS Access opens the word object but as soon as it tries to find and replace Access crashes with no error. I have tried it on a number of computers both with and without Visual Studio and the result is always the same. I have tried installing VBRun600 and the latest VB scripting engine but with no effect. Has anyone else come across this problem and if so how did you fix it? Any help would be greatfully received as I currently have little hair left.

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

    Re: Microsoft Access Launching Microsoft Word Crash (Office 2000)

    Try the following:

    Open the database on a machine without Visual Studio. Keep the Shift key down to bypass startup options if necessary.
    Activate the Visual Basic Editor (Alt+F11)
    Select Tools | References...
    If there are references starting with MISSING, clear their check boxes, then click OK.
    Select Debug | Compile <projectname>
    Do you get any compile errors?

  3. #3
    New Lounger
    Join Date
    Jul 2003
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Microsoft Access Launching Microsoft Word Crash (Office 2000)

    It unfortunately does not having any MISSING and when compiled has no errors. MSAccess says it is writing an error log when it crashes but the file doesn't exist anywhere giving no clues.

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

    Re: Microsoft Access Launching Microsoft Word Crash (Office 2000)

    Never mind the error log; I have yet to see the first error log that provides usable information.

    I don't know if the following will make a difference, but you might try to use late binding instead of early binding. Try this on a copy of the database. Replace code such as

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

    or

    Dim oWord As New Word.Application

    by

    Dim oWord As Object
    Set oWord = CreateObject("Word.Application")

    Similarly, replace all declarations of type As Word.Document, As Word.Range etc. by As Object.

    You could go one step further and replace all Word constants such as wdReplace, wdSavechanges etc. by their numeric value. You can look up these values in the Object Browser. If you then remove the reference to the Microsoft Word 9.0 Object Library, the code should still compile OK.

    If you like, you can post the relevant part of your code: copy it from the Visual Basic Editor, and paste it into a reply; if it is long, paste it into a text file and attach that to a reply.

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Microsoft Access Launching Microsoft Word Crash (Office 2000)

    The error is being written to one of the event logs and the information is designed for technical support not for the people who actually trip over the error. All it would tell you clearly is the executable or library that actually triggered the crash, which usually isn't an awful lot of help.
    Charlotte

Posting Permissions

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