Sub GenererDocument()
Dim wordapp As Word.Application
Dim worddoc As Word.Document
Dim W As Long, H As Long
Dim Derligne As Integer
Dim F As Worksheet
Dim TIC As Range
Const wdExportFormatPDF = 17
Set wordapp = CreateObject("Word.application")
Set worddoc = wordapp.Documents.Open(ThisWorkbook.Path & "\TestLogo.docx")
Set F = ThisWorkbook.Sheets("Animal")
'Set TIC = Range("C" & Derligne).Value
'Derligne = F.Range("C" & Rows.Count).End(xlUp).Row
worddoc.Bookmarks("Animal").Range.Text = CboxAnimal
With worddoc.Bookmarks("Logo").Range
With .InlineShapes(1)
W = .Width
H = .Height
.Delete
End With
With .InlineShapes.AddPicture(ThisWorkbook.Path & "\Logo\" & CboxAnimal & ".jpg")
.Width = W
.Height = H
End With
End With
'TIC = "Chat"
'worddoc.Bookmarks("Texte").Range.Text = Sheets("Parametres").Range("A19")
wordapp.Visible = False
worddoc.ExportAsFixedFormat _
OutputFileName:=ThisWorkbook.Path & "\_" & ".pdf", _
ExportFormat:=wdExportFormatPDF, OpenAfterExport:=True
'"_" & ".pdf", ExportFormat:= _
'17, OpenAfterExport:=True, OptimizeFor:= _
'0, Range:=0, From:=1, To:=1, _
'Item:=0, IncludeDocProps:=True, KeepIRM:=True, _
'CreateBookmarks:=0, DocStructureTags:=True, _
'BitmapMissingFonts:=True, UseISO19005_1:=False
worddoc.Close SaveChanges:=False
wordapp.Quit 'Ferme la session word
End Sub