View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.programming
John John is offline
external usenet poster
 
Posts: 2,069
Default Test if Word is running

Nevermind...found a solution.

On Error Resume Next
Set oWord = GetObject(, "Word.Application")
If Err Then
Else
MsgBox ("Stop")
End
End If

Credit goes to http://www.word.mvps.org/FAQs/InterD...XLFromWord.htm

"Jacob Skaria" wrote:

Set the visible property of Word Application object to True .

If this post helps click Yes
---------------
Jacob Skaria


"John" wrote:

I have a macro that cycles through a group of word docs and imports data into
an excel spreadsheet. Unfortunetly, if a copy of Word is running before the
macro runs I get all kinds of errors.

Is there any way to test from Excel if any copies of Word are running, and
if so stop the macro?

Using Excel 2003, thanks in advance!