Re: How to tell if word is already running
- From: "Dirk Goldgar" <dg@xxxxxxxxxxxxxxxxxxxxxx>
- Date: Thu, 28 Jul 2005 15:08:16 -0400
"JWS315" <JWS315@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:76C8352A-32A6-479A-8016-5D03221796B5@xxxxxxxxxxxxx
> How can I tell if an instance of Word is already running from Access
> so that I can issue a message to the user to close Word before they
> run my report?
One way is described at this link:
http://www.mvps.org/access/api/api0007.htm
API: Find out if an application is currently running
Another way would be to try to get a reference to the Word application
object, and see if you succeed:
Dim oWord As Object
On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err.Number = 0 Then
Set oWord = Nothing
MsgBox "Word is running; please close it."
End If
--
Dirk Goldgar, MS Access MVP
www.datagnostics.com
(please reply to the newsgroup)
.
- Follow-Ups:
- Re: How to tell if word is already running
- From: JWS315
- Re: How to tell if word is already running
- References:
- How to tell if word is already running
- From: JWS315
- How to tell if word is already running
- Prev by Date: Re: ALTER Table/UPDATE Syntax
- Next by Date: Re: How to tell if word is already running
- Previous by thread: How to tell if word is already running
- Next by thread: Re: How to tell if word is already running
- Index(es):
Relevant Pages
|