Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
VFP & Power Point
Message
De
26/02/1998 00:08:27
 
 
À
25/02/1998 09:49:06
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Produits tierce partie
Divers
Thread ID:
00081065
Message ID:
00081279
Vues:
40
You have 2 choices:
x=CREATEOBJECT("Powerpoint.Application")
x.Presentation. ... = 
See \Program Files\Microsoft Office\Office\VBAPPT8.HLP, which you'll need to install explicitlly.

Or, alternatively, you can use VFP to start any windows program. In the case of PPT,
SHELLEXEC( "D:\SomeDir\SomeFile.PPT")



* WinApi :: ShellExecute
*********************************
***  Function: Opens a file in the application that it's
***            associated with.
***      Pass: lcFileName -  Name of the file to open
***   
***  Return:   2  - Bad Association (e.g., invalid URL)
***            31 - No application association
***            29 - Failure to load application
***            30 - Application is busy 
***
***            Values over 32 indicate success
***            and return an instance handle for
***            the application started (the browser) 
************************************************************************
LPARAMETERS lcFileName, lcWorkDir, lcOperation

lcWorkDir=IIF(type("m.lcWorkDir")="C",m.lcWorkDir,"")  &&can be SYS(2023)
lcOperation=IIF(type("m.lcOperation")="C" AND !EMPTY(m.lcOperation),m.lcOperation,"Open")

*-* HINSTANCE ShellExecute(hwnd, lpszOp, lpszFile, lpszParams, lpszDir, wShowCmd)
*-* 
*-* HWND hwnd;	/* handle of parent window	*/
*-* LPCTSTR lpszOp;	/* address of string for operation to perform	*/
*-* LPCTSTR lpszFile;	/* address of string for filename	*/
*-* LPTSTR lpszParams;	/* address of string for executable-file parameters	*/
*-* LPCTSTR lpszDir;	/* address of string for default directory	*/
*-* INT wShowCmd;	/* whether file is shown when opened	*/

DECLARE INTEGER ShellExecute ;
    IN SHELL32.DLL ;
    INTEGER nWinHandle,;
    STRING cOperation,;   
    STRING cFileName,;
    STRING cParameters,;
    STRING cDirectory,;
    INTEGER nShowWindow

    
RETURN ShellExecute(0,m.lcOperation,m.lcFilename,"",m.lcWorkDir,1)
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform