Option Explicit
Private 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
Private Sub Command1_Click()
Dim r As Long
r = ShellExecute(hWnd, "open", "C:\Sylvain\Contrôle de clé\Calcul des Clés.doc", vbNullString, "C:\Sylvain\Contrôle de clé", 1)
If r > 32 Then
MsgBox "ça marche"
Else
MsgBox "pas marché"
End If
End Sub
---------------
Des bons sites pour Delphi? http://forum.hardware.fr/forum2.php3?post=16838&cat=10 -- informaticien -- http://www.z0rglub.com/phpwebgallery/ -- Delphi :love: