Results 1 to 6 of 6
  1. #1
    Join Date
    Nov 2004
    Posts
    3

    Unanswered: mailmerge probs in Access 2K and XP

    I hope someone can help me wth this.

    I have an Access 2K application that generates mailmerge documents using automation. The application works perfectly in windows 98 and millenium. However, when the application is installed and run on MS XP, I have a problem with the automation.

    The error number I get when I debug is '-2147319779(8002801d)'. When I step through the code. the problem seems to lie in my mailmerge code and it seems like it faults out when I instantiate the Word object:

    'Set m_objWord = New Word.Application'

    It appears as though some library is not registered. I have tried to maually load a '.dll' that I believe is relevant and causing the problem. But when I run:

    'regsvr32.exe vbajet32.dll'

    I get an error message that states 'vbajet32.dll was loaded, but the dllRegisterServer entry point was not found. This file cannot be registered.'

    To make matters more complicated. If I open the Word mailmerge document and click on 'merge', the form letters are correctly populated. Hence when starting from the Word mailmerge template, the connection to the database is established, the query is run and the mailmerge is populated with data.

    Any help, even a direction to pursue is greatly appreciated.

    Thanks in advance.

  2. #2
    Join Date
    Sep 2003
    Location
    Caldes de Malavella, Spain
    Posts
    244

    Lightbulb

    Instead of using New Word.Application, you might want to use GetObject instead. The former has been causing real problems in the last few versions of Access. Look up GetObject usage in Help and give it a go.

    If you are still having problems, let me know and I'll see what we can do to resolve the problem

    Kind regards

    Andy Briggs
    Elmhurst Solutions Limited
    Database Consultancy And Design
    http://www.elmhurstsolutions.com
    Last edited by andybriggs; 11-17-04 at 04:43.
    Andy Briggs
    Elmhurst Solutions Limited
    Database Development and Consultancy
    http://www.elmhurstsolutions.com

  3. #3
    Join Date
    Nov 2004
    Posts
    3
    Thanks for the tip Andy. Unfortunately, it didn't work. Same error message.

    I have tried CreateObject(), GetObject() followed by obj_variable.Document.Open(), obj_variable.Document.Add() in all combinations. I have also tried to manually register the ole32.dll and oleaut32.dll libraries thinking that they may be the problem and I still have the same problem. Any other suggestion would be appreciated.

  4. #4
    Join Date
    Sep 2003
    Location
    Caldes de Malavella, Spain
    Posts
    244
    Well I think that a re-install of Access would be the next thing to try.....
    Andy Briggs
    Elmhurst Solutions Limited
    Database Development and Consultancy
    http://www.elmhurstsolutions.com

  5. #5
    Join Date
    Nov 2004
    Posts
    3
    Andy,

    I tried both a "detect and repair" and the repair utility in the from the CD setup.exe. Neither has solved the problem. The code always faults out at the instantiation line when I step through the code and the error message indicates the the library is not registered. I have noticed that the word application is opened (ctrl-alt-del shows Winword.exe running as a process for each attempt to run the automation code) with
    each attempt.

    Additionally, I have tried registering the library manually "regtlib.exe c:\program Files\Microsoft Office\Office\MSWORD9.olb". It seems to register fine.

    I am running out of ideas. Any thoughts from you?

  6. #6
    Join Date
    Sep 2003
    Location
    Caldes de Malavella, Spain
    Posts
    244
    What I would do would be do completely un-install Access from your machine and then re-install it. If you know how to edit the Registry, I'd also track down any keys for the libraries concerned and remove those too ( but be careful, and take a backup of your Registry first) after the un-install and before re-installing.
    Andy Briggs
    Elmhurst Solutions Limited
    Database Development and Consultancy
    http://www.elmhurstsolutions.com

Posting Permissions

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