"mailto:" en VB

Skippy - 20 juil. 2001 à 16:07
webcyril Messages postés 16 Date d'inscription jeudi 1 février 2001 Statut Membre Dernière intervention 9 novembre 2004 - 24 août 2004 à 14:48
J'utilise Visual Basic 6.
Je voudrais créer un bouton qui, quand on clique dessus, ouvre un nouveau mail outlook.
Bref, faire un "mailto:" en Visual Basic.
Je ne vois pas comment faire.
Merci de m'aider !
Skippy :)
[mailto:cydumas@hotmail.com cydumas@hotmail.com]

3 réponses

Tu déclares cette API :
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

Ensuite dans ton bouton tu mets :
ShellExecute hWnd, vbNullString, "mailto:" & adresse &"?subject=" & sujet & "&object=" & texte, vbNullString, vbNullString, 1


Le paramètre "1" c'est pour ouvrir Outlook avec un NormalFocus
0
Tu déclares cette API :
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

Ensuite dans ton bouton tu mets :
ShellExecute hWnd, vbNullString, "mailto:" & adresse &"?subject=" & sujet & "&object=" & texte, vbNullString, vbNullString, 1


Le paramètre "1" c'est pour ouvrir Outlook avec un NormalFocus
0
webcyril Messages postés 16 Date d'inscription jeudi 1 février 2001 Statut Membre Dernière intervention 9 novembre 2004
24 août 2004 à 14:48
Et pour ajouter une pièce attachée ??

webcyril
0
Rejoignez-nous