Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
WORD automation and busy signals
Message
From
15/01/2001 19:27:14
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
 
 
To
15/01/2001 19:18:23
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00463296
Message ID:
00464012
Views:
20
John

Eek, a posted bug in code!!!

Herewith (part of a line somehow got lost while I was fiddling the html...)


if type('pgHwndWord')="U"
DECLARE integer GetForegroundWindow in WIN32API
DECLARE integer SetForegroundWindow in WIN32API integer
DECLARE short IsWindow in WIN32API integer
public pgHwndWord,poWordApplication
endif

if empty(pgHwndWord) or ! iswindow(pgHwndWord)=1
**technically better to say "or iswindow(pgHwndWord)!=1 "

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

pgHwndWord = GetForegroundWindow() && Save word window handle
else
SetForegroundWindow(pgHwndWord)
endif

"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Previous
Reply
Map
View

Click here to load this message in the networking platform