rebonjour a tous
j'ai ajouter a mon devis facturier un bouton pour envoyer la feuille active par email sans outlook
j'ai glanner la macro dans les sources
et voila ce que me dis une fenetre popup a la fin de la macro
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
32
33
34
35
36
37
38
39
40
41 Private Sub CommandButton1_Click() Dim Sourcewb As Workbook Dim Destwb As Workbook Dim Temp As String Dim CdoMessage As Object Dim Fichier As String Set Sourcewb = ActiveWorkbook ActiveSheet.Copy Set Destwb = ActiveWorkbook Temp = ThisWorkbook.Path & Application.PathSeparator & "DEVIS " & Sheets("DEVIS").Range("b11") & " " & Sheets("DEVIS").Range("b12") & ".xls" With Application .ScreenUpdating = False .DisplayAlerts = False End With Destwb.SaveAs Temp Fichier = Destwb.Path & Application.PathSeparator & Destwb.Name Destwb.Close Application.DisplayAlerts = True Set CdoMessage = CreateObject("CDO.Message") With CdoMessage .Subject = "devis" .From = "rapidoservice@live.fr" .To = mailtos.adresse.Caption .CC = "" .BCC = "" .TextBody = "voici le devis concernant" & Sheets("DEVIS").Range("b12").Value .AddAttachment Fichier .Send End With Application.ScreenUpdating = True Set CdoMessage = Nothing 'Kill Fichier End Sub
"la valeur de configuration "sendusing" est non valide
quelq'un aurais t il une idée
merci d'avance
Partager