Bonjour,
j'ai un fichier trop lourd, je veux, au click, le compresser et l'envoyer par mail, j'utilise le code suivant:
Merci
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 Private Sub Commande52_Click() Dim oApp As Outlook.Application Dim oMail As Outlook.MailItem Dim fichier As String fichier = "C:\Users\ahmed\Documents\archives" ' Creation session Outlook Set oApp = New Outlook.Application 'Set oApp = CreateObject("Outlook.Application") ' Creation mail Set oMail = oApp.CreateItem(olMailItem) With oMail .To = "mahrezs@gmail.com" .Subject = "la copie de l'application" .Body = "Application" .Attachments.Add fichier .Send End With End Sub





Répondre avec citation



Partager