Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

envoyer le resultat d'une requete par mail

1 réponse
Avatar
news.tiscali.fr
Bonjour,

J'ai le code suivant pour envoyer un mail :

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

1 réponse

Avatar
3stone
Salut,

"news.tiscali.fr"
[...]
| Je cherche à compléter le Body avec le résultat d'une requête.


Je te propose mettre ta requête comme source d'un état
et d'intégrer ton état par ceci :
http://www.3stone.be/access/articles.php?lng=fr&pg


--
A+
Pierre (3stone) Access MVP
Perso: http://www.3stone.be/
MPFA: http://www.mpfa.info/ (infos générales)