Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
SendKeys to close Word
Message
De
07/03/2001 11:37:10
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00482494
Message ID:
00482743
Vues:
12
Hi George,

As I've explained, I didn't write the code, I inherited it. I've modified it to run a different version of Word in a different directory.
The routine code follows:

* FormSet1.Send2Word()
parameters pcFileName, pnRecordNo
local llOpened, lnChannel
lnChannel=-1
do while lnChannel<0
lnChannel=DDEInitiate("WinWord","System")
if lnChannel<0
*!* run /n o:\off97pro\office\winword.exe
*!* run /n o:\O2K\PFILES\MSOFFICE\OFFICE\winword.exe
run /n o:\O2K Premium\PFILES\MSOFFICE\OFFICE\winword.exe
*!* run /n c:\program FILES\Microsoft OFFICE\OFFICE\winword.exe
endif
enddo
*!* set step on
llOpened=DDEExecute(lnChannel,'[FileOpen "&gcBasePath&pcFileName"]')
select summary
goto pnRecordNo
replace stillopen with llOpened,filename with pcFileName
flush
*!* application.quit
=DDETerminate(lnChannel)
*!* application.quit
with This.ProcessingCenter.GrantNumberGrid
.refresh()
.Column1.setfocus()
endwith
* hide the window and give focus to Word
_screen.WindowState=1
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform