Bonjour, j'ai un pb pour l'envoi de mail via visual basic voici mon code:
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
 
Dim o As Outlook.Application
Set o = New Outlook.Application
Dim mail As Outlook.MailItem
Set mail = o.CreateItem(olMailItem)
 
la_date = Format(Now, "-d-m-yy")
Fichier = Nom_client.Text & Ville.Text & la_date & ".doc"
With mail
    .Subject = "Devis de réparation"
    .To = A_mail.Text
    .CC = "s.leon@lete.fr"
    .Body = "Voici le devis de réparation"
    .Attachments.Add ("\\Servfichier\Administ\Bureau\Service colis\Devis\" & Fichier)
    .Send
End With
 
Set mi = Nothing
Set o = Nothing
Label7.Caption = "SUCCESS MAILING"
sub1:
en fait, le pb c'est qu'il ne trouve pas mon fichier a joindre alors qu'il est bien present a l'endroit specifie.De plus, pouvez vous me dire si le code en lui meme est correct.Merci