Sub Signet_WORD_vers_Cellule_XL()
Dim appWord As Object, Doc As Object, strFich$
'Attention:=> CHANGER Chemin et nom du fichier WORD
strFich = "C:\Users\STAPLE1600\Documents\tests\test.docx"
Set appWord = CreateObject("Word.Application")
With appWord
.Visible = True
Set Doc = .Documents.Open(strFich)
With Doc
ActiveSheet.[H1].Value = .Bookmarks("ville2").Range.Text
.Save
End With
.Quit
End With
End Sub
Sub Copie_Cellule_XL_vers_Signet_WORD()
Dim appWord As Object, Doc As Object, strFich$, BMRange As Object
'Attention:=> CHANGER Chemin et nom du fichier WORD
strFich = "C:\Users\STAPLE1600\Documents\tests\test.docx"
Set appWord = CreateObject("Word.Application")
With appWord
.Visible = True
Set Doc = .Documents.Open(strFich)
With Doc
Set BMRange = .Bookmarks("ville2").Range
BMRange.Text = ActiveSheet.[I8]
.Bookmarks.Add "ville2", BMRange
.Save
End With
.Quit
End With
End Sub