Thanks for your reply, Thomas. What I'm running into is that oWord = CreateObject("word.application") triggers the OLE error I mentioned below whether or not a previous instance of Word is running. I use a routine similar to yours to check for a running instance before creating a new one, but even without doing that CreateObject() should create a new instance regardless of whether one is already running or not. I think I need to find out what the "message filter" referred to in the error message is.
>I don't know that the issue is a difference between different versions of Word,
>as it may be a Word session already open.
>
>There has not been a problem since I start the Word routine sending the name
>of the error handler to to cOldError. Then I use the following:
>
> ON ERROR DO myWordError && identify the Word Error handler
> oWord = GetObject("word.application") &&If it is open, I got it. If not,
&&myWordError creates the object
> ON ERROR DO cOldError && Return the original error handler
>
> FUNCTION myWordError
> oWord = CreateObject("word.application")
>
>>On a computer with Office 97 on it, oWord = CreateObject("word.application") starts an instance of Word and returns an object reference to it. On a new computer with Office 2000, the same code starts an instance of Word but returns OLE error 0x8001010a: "The message filter indicated that the application is busy." After clearing the error message, oWord = GetObject(, "word.application") successfully creates a VFP object reference to the running instance. Is there some difference in how a Word 2000 automation server should be started from VFP, vs. Word 97?
Rick Borup, MCSD
recursion (rE-kur'-shun) n.
see recursion.