Private Sub CommandButton6_Click()
Unload Me
Dim Wapp As Object, X$
On Error Resume Next
Set Wapp = GetObject(, "Word.Application")
If Wapp Is Nothing Then Set Wapp = CreateObject("Word.Application")
Wapp.Visible = True
Wapp.Documents.Open ThisWorkbook.Path & "\Courrier_Type_Artiste.docm" 'nom à adapter
With Wapp.ActiveDocument
.Bookmarks("Date").Range = Date
X = Replace(Replace(Replace(CbxCivilite, "M.", "Monsieur"), "Mme", "Madame"), "Mlle", "Mademoiselle")
.Bookmarks("Civilite1").Range = X
.Bookmarks("Civilite2").Range = X
.Bookmarks("Civilite3").Range = X
.Bookmarks("Nom").Range = TextBox24 & " " & TextBox2
.Bookmarks("Adresse").Range = Mid(IIf(TextBox3 = "", "", vbLf & TextBox3) & IIf(TextBox4 = "", "", vbLf & TextBox4) _
& IIf(TextBox5 = "", "", vbLf & TextBox5) _
& IIf(TextBox6 = "", "", vbLf & TextBox6), 2) & vbLf & TextBox7 & " " & TextBox25 & IIf(TextBox9 = "", "", vbLf & TextBox9)
'.bookmarks("Adresse2").range= mid(iif
End With
[FONT=arial][COLOR=rgb(0, 0, 0)]Application.WindowState = xlMinimized
AppActivate "Word" 'facultatif[/COLOR][/FONT]
End Sub