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 32 33 34 35 36 37 38 39 40 41 42 43 44
| Public Class Form_rajouts
Dim rajout(0 To 3, 0) As String
Dim i As Integer
Dim j As Integer
Dim OutlookApp As New Microsoft.Office.Interop.Outlook.Application
Dim NewMail As Microsoft.Office.Interop.Outlook.MailItem
Private Sub Form_rajouts_Load(sender As Object, e As EventArgs) Handles MyBase.Load
i = 0
j = 0
End Sub
Private Sub Envoyer_Click(sender As Object, e As EventArgs) Handles Envoyer.Click
rajout(0, 0) = "Affaire: " & TB_affaire.Text
rajout(1, 0) = "Adresse: " & TB_adresse.Text
rajout(2, 0) = "Colisage: " & TB_colisage.Text
rajout(3, 0) = "Délai demandé: " & TB_delai.Text
NewMail = OutlookApp.CreateItem(Microsoft.Office.Interop.Outlook.OlItemType.olMailItem)
NewMail.Recipients.Add("xxx@laposte.net")
NewMail.Subject = "Rajouts expés"
NewMail.Body = rajout()
NewMail.Send()
End Sub
Private Sub Suivant_Click(sender As Object, e As EventArgs) Handles Suivant.Click
j = j + 4
ReDim Preserve rajout(0 To j, 0)
'rajout(0) = "Affaire: " & TB_affaire.Text
'rajout(1) = "Adresse: " & TB_adresse.Text
'rajout(2) = "Colisage: " & TB_colisage.Text
'rajout(3) = "Délai demandé: " & TB_delai.Text
rajout(j, 0) = "======================="
rajout(j + 1, 0) = "Affaire: " & TB_affaire.Text
rajout(j + 2, 0) = "Adresse: " & TB_adresse.Text
rajout(j + 3, 0) = "Colisage: " & TB_colisage.Text
rajout(j + 4, 0) = "Délai demandé: " & TB_delai.Text
TB_affaire.Text = ""
TB_adresse.Text = ""
TB_colisage.Text = ""
TB_delai.Text = ""
End Sub |
Partager