Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WORD automation and busy signals
Message
From
13/01/2001 11:37:31
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00463296
Message ID:
00463389
Views:
19
Neil,
This is referred in MS KB q240809 and as a workaround :
APPLICATION.OLERequestPendingTimeout = 0
is suggested. However it doesn't work in your case.
This works :
DECLARE integer GetForegroundWindow in WIN32API
DECLARE short IsWindow in WIN32API integer
declare Sleep in win32API integer

** create WORD server
oo = createobject("word.application")
oo.visible = .t.
** maximize WORD
oo.windowstate = 1
oo.activate

gHwndWord = GetForegroundWindow() && Save word window handle

** create wait state to keep WORD on DeskTop
do while IsWindow(gHwndWord) # 0
  =Sleep(1000) && Do nothing for 1 sec
enddo
do returnme
messagebox("You closed WORD")
oo = .null.
release oo
messagebox("Automation Reference Is Gone")

procedure returnme
messagebox("You are in Procedure: Returnme")
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform