Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
WORD automation and busy signals
Message
De
15/01/2001 19:27:14
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
 
 
À
15/01/2001 19:18:23
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00463296
Message ID:
00464012
Vues:
18
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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform