Salut,
Première étape, faire une sélection de l'endroit où sera insérée l'image.
ActiveDocument.Tables(1).Cell(1, 1).Range.Select
Ensuite, pour insérer l'image, il faut exécuter la boîte de dialogue
Voilà ton code corrigé.
1 2 3 4 5 6 7 8 9 10 11 12 13 14
| Private Sub Inserer_Image_dans_Tableau_Click()
ActiveDocument.Tables(1).Cell(1, 1).Range.Select
With Application.Dialogs(wdDialogInsertPicture)
'Bring up InsertPicture Dialog box.
.Display
'this is your path and filename
LabelPicPath = .Name
MsgBox "Image :" & LabelPicPath
.Execute
End With
End Sub |
Partager