Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Location
    Caldes de Malavella, Spain
    Posts
    244

    Unanswered: Detecting Word in memory

    Hi All,

    A database that we have written has some code that looks for any copies of Word that are currently open and asks the user to close them before proceeding. The logic is quite straightforward: Access tries to assign the value of an Object to an open copy of Word with :

    Set obj = CreateObject(,"Word.Application)

    If this succeeds we know that there is a copy of Word open; if not, the user can proceed.

    This works fine when run under Access XP...but.....

    When it is run under Access 2003, it asks the user to close Word if there is a copy of OUTLOOK open. I don't know how this can be, as we are specifically looking for a Word.Application object.

    So....does anybody know why this happens? I haven't tried it with other open MS Office apps like Excel, but does anybody have any idea why the change in behaviour between the two versions?

    More to the point, is there another, perhaps more reliable, way of detecting an open copy of Word from within an Access database? Perhaps an API call?

    Many thanks for any help you can give me with this.
    Andy Briggs
    Elmhurst Solutions Limited
    Database Development and Consultancy
    http://www.elmhurstsolutions.com

  2. #2
    Join Date
    Sep 2003
    Location
    Caldes de Malavella, Spain
    Posts
    244
    Sorry, typo: that should have read "GetObject", not "CreateObject" of course.
    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
  •