Makabey
Messages postés152Date d'inscriptionmercredi 27 juin 2001StatutMembreDernière intervention11 juillet 20021 31 déc. 2001 à 03:30
Essaie ceci:
'Pour fonction DemarrerAppURL
Public Const SW_SHOW = 1
Public 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
Public Sub DemarrerAppURL(ByRef frm As Form, ByVal WebPageURLorFileName As String)
'
' Utiliser comme suit:
'
' Call DemarrerAppURL(Me, "http://www.vbthunder.com") Pour un site web OU
' Call DemarrerAppURL(Me, "C:\MyPath\testdoc.doc") Pour ouvrir un fichier X
' avec son application par défaut.
'
' Fonctionne avec tout fichier ayant une application associée.
'
ShellExecute frm.hwnd, "open", WebPageURLorFileName, "", "", SW_SHOW
End Sub