Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Office 2007 breaks word Automation
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 8 SP1
OS:
Windows XP
Network:
Windows 2003 Server
Database:
Visual FoxPro
Miscellaneous
Thread ID:
01331039
Message ID:
01331388
Views:
24
I think I always put office automation in the try/catch block with the finally statements something like
if vartype(oWord) = 'O'
   oWord.Quit
   oWord = null
endif
You also can use an extra check from http://www.berezniker.com/content/pages/visual-foxpro/check-if-exe-running-and-optionally-terminate-it in case Word is somehow still in the memory.

>oWord.Quit
>I thought the same thing, check the Task Manager, but NO Word icon. I remembered a trick using "Alt Tab" and there the icon was. Is that because it is in memory? I tabbed to it and the "File in Use" message displays. I select the 3rd option and the app continues as it should. This message is suspending the merge until acted on, kind of like the "an unknown process is trying to access the contact list" when automating Outlook. This is of course unacceptable for the user to deal with.
>
>It is very interesting that no other has reprot this issue. Maybe they had the issue but figured it out...I am lost as to a solution.
>
>>>right away on 2nd attempt and I quit word and relase object. "File in Use" happens before code to quit. Restarting PC has nothing to do with running the process, I can recover by selecting the 3rd option of the message.
>>>
>>
>>It looks like Word is not properly released. Did you try John's suggestion or checked the Task Manager? What is your closing code for Word?
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform