Sub Cmd4()
Dim rep As String
Dim odlg As Dialog
Application.ScreenUpdating = False ' pour geler L 'affichage
rep = MsgBox("Enregistrer Votre Document", vbYesNoCancel + vbInformation, "Attention Enregistrement")
Select Case rep
Case vbYes
Set odlg = Application.Dialogs(wdDialogFileSaveAs)
With odlg
.Name = ThisDocument.TextBox3 & " " & ThisDocument.TextBox21 & " " & ThisDocument.TextBox2 & " " & "Réf" & " " & ThisDocument.TextBox1
TextBox2 = Format(TextBox2, "dddd dd mmmm yyyy")
TextBox1 = Format(TextBox1, "0000_000")
End With
odlg.Show
Case vbNo 'Msg
Exit Sub
Case vbCancel
Exit Sub
End Select
SupprimeToutesLesMacros
CommandBars("MBA").Delete
ThisDocument.Save
ThisDocument.Close
Application.Quit
Application.ScreenUpdating = True ' pour dégeler l'affichage
End Sub