Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As Boolean)
If Target.Row < 8 Or Target.Column <> 8 Or Target = "" Then Exit Sub
Dim Wapp As Object, ferme As Boolean, Wdoc As Object, nomfich$
Cancel = True
Target.EntireRow.Name = "P" 'plage nommée
On Error Resume Next
Set Wapp = GetObject(, "Word.Application") 'si Word est ouvert
If Wapp Is Nothing Then Set Wapp = CreateObject("Word.Application"): ferme = True
Wapp.Visible = True
Set Wdoc = Wapp.Documents.Add 'nouveau document
Feuil2.[A1:F25].Copy: Wapp.Selection.Paste: Application.CutCopyMode = 0 'copier-coller
With Wdoc.Content.ParagraphFormat 'mise en forme
.SpaceBefore = 3
.SpaceAfter = 3
End With
nomfich = Target & Format(Date, " yyyy-mm-dd")
Wapp.Documents(nomfich).Close False 'si le fichier Word est ouvert il est fermé
On Error GoTo 0
Wdoc.SaveAs ThisWorkbook.Path & "\" & nomfich
If ferme Then Wapp.Quit 'ferme Word
Set Wapp = Nothing
MsgBox "Le document WORD '" & nomfich & "' a été créé..."
End Sub