1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
| Sub TableauCopierColler()
Dim r As Integer, c As Integer
Dim indice As Integer
indice = 1 ' La collection Tables commence à 1
'sélectionne la première cellule du premier tableau
ActiveDocument.Tables(indice).Cell(0, 0).Select
For r = 1 To ActiveDocument.Tables(indice).Rows.Count
For c = 1 To ActiveDocument.Tables(indice).Columns.Count
ActiveDocument.Tables(indice).Cell(r, c).Select
' Modifie le contenu de la cellule
MsgBox Selection '.TypeText.Text ':=Str(r) & ", " & Str(c)
Selection.Copy
ActiveDocument.Tables(2).Cell(r, c).Select
Selection.Paste
Next c
Next r
End Sub |
Partager