Private Sub Workbook_Open()
If ActiveWorkbook.Name = "AUTO.xlsm" Then
Application.DisplayAlerts = False
BackgroundQuery = False
RefreshAll

ActiveWorkbook.SaveAs "C:\...\RAL" & "_" & Format(Now, "yyyy-mm-dd") & ".xlsm"
ActiveWorkbook.SaveAs "U:\...\RAL" & "_" & Format(Now, "yyyy-mm-dd") & ".xlsm"""
ActiveWorkbook.SaveAs "C:\...\JOUR.xlsm"

Dim ObjOutlook As New Outlook.Application
Dim oBjMail
Dim Nom_Fichier As String
   
    Set ObjOutlook = New Outlook.Application
    Set oBjMail = ObjOutlook.CreateItem(olMailItem)
'---------------------------------------------------------
   'Exemple pour envoyer un classeur en pièce jointe
   'Nom_Fichier = Application.GetOpenFilename("Fichier excel (*.xls;*.xlsx;*.xlsm), *.xls;*.xlsx;*.xlsm")
   'If Nom_Fichier = "Faux" Then Exit Sub
'---------------------------------------------------------
   'Ou bien entrer le path et nom du fichier autrement
   Nom_Fichier = "C:\...\JOUR.xlsm"
   If Nom_Fichier = "" Then Exit Sub
'---------------------------------------------------------
    With oBjMail
        .To = "...@mail.com;" ' le destinataire
       .Subject = "En-Commande"          ' l'objet du mail
       .Body = "... "  'le corps du mail ..son contenu
       .Send
       Application.Wait (Now + TimeValue("0:05:30"))
       
    End With
    ObjOutlook.Quit
    Set oBjMail = Nothing
    Set ObjOutlook = Nothing

Application.DisplayAlerts = True
Application.Quit
End If
End Sub

