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

    Unanswered: REPOST: 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 = GetObject(,"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
    Jun 2002
    Location
    Saudi Arabia / Philippines
    Posts
    126
    Just a thought - does Outlook use Word as its text editor and is your application somehow seeing this variant of Word?
    Rod

    fe_rod@hotmail.com

  3. #3
    Join Date
    Sep 2003
    Location
    Caldes de Malavella, Spain
    Posts
    244
    Thanks Rod - do you know, that hadn't occurred to me. I shall check the client's machines.

    Does my code logic look OK to you? It should only detect Word. Applications, shouldn't it?

    Many, many thanks for replying. I wouldn't be surprised if our client uses Word as their editor in Outlook, but I don't see how Access would think that Word is loaded. Stranger things have happened, however, so it's definitely worth investigating. I shall be seeing the client in about two weeks, so I will let you know whether your guess was right!!

    All the best

    Andy
    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
  •