Ver Mensaje Individual
  #2 (permalink)  
Antiguo 04/03/2004, 10:02
Avatar de HiTek
HiTek
 
Fecha de Ingreso: noviembre-2003
Ubicación: LF, Santiago.Chile
Mensajes: 217
Antigüedad: 23 años
Puntos: 0
Holas vele esto te sirve pra abri cualquier archivo siempre y cuando este instalada la aplicación que lo pueda ejecutar, puedes ver en la Variable RetVal el valor que regresa si no está instalada la aplicación o si el archivo no tiene el nombre especificado y asi controlar esos errores...salu2
Código PHP:
Private Sub Command1_Click()
    
Call AbrePDF("test.pps")
End Sub

Sub AbrePDF
(MiArchivoPPS As String)
    
RetVal = ShellExecute(Me.hWnd, vbNullString, MiArchivoPPS, vbNullString, App.Path & "\\", SW_SHOWMAXIMIZED)
    
RetVal = ShellExecute(Me.hWnd, vbNullString, MiArchivoPPS, vbNullString, App.Path & "\\", SW_SHOWMAXIMIZED)
End Sub 

y en un Módulo colocas esto

Código PHP:
Declare Function ShellExecute Lib "shell32.dll" Alias "ShellExecuteA" _
(ByVal hWnd As Long, ByVal lpOperation As String, ByVal lpFile As String, _
ByVal lpParameters 
As String, ByVal lpDirectory As String, ByVal nShowCmd As Long) As Long