Bonjour,

J'ai le code suivant pour envoyer un mail :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
Private Sub btnsend_Click()
Dim Attach As Variant
Dim I As Integer
    Dim oEmail As Outlook.MailItem
    Dim appOutLook As Outlook.Application
 
    ' créer un nouvel item mail
 
    Set appOutLook = New Outlook.Application
    Set oEmail = appOutLook.CreateItem(olMailItem)
 
    ' les paramètres
 
    oEmail.To = Me.txtto
 
    oEmail.Subject = Me.txtobjet
    oEmail.Body =     "test ligne 1" & Chr(10) & _
                              "test ligne 2" & Chr(10) & _
                              "test ligne 3" & Chr(10)
 
 
    ' envoie le message
    oEmail.Save
 
    ' détruit les références aux objets
    Set oEmail = Nothing
 
    Set appOutLook = Nothing
 
 
End Sub
Je cherche à compléter le Body avec le résultat d'une requête.

Comment fait-on ?

Merci d'avance

seb