Manipuler des photos sous Word depuis Excel
Bonjour à tous et à toutes
Depuis excel, j'insère du texte et des photos dans un document Word
Cela fonctionne
Je souhaite pouvoir redimensionner les photos et là, ca coince
"erreur d'exécution 438 / propriété ou méthode non gérée par cet objet"
Code:
1 2 3 4 5 6 7 8 9 10 11
| objselection.TypeText Chr(10)
objselection.InlineShapes.AddPicture Filename:="e:\1 - aff\" & RepPhoto & "\3-chantier\5-opr et reception\" & RefPhoto & ".jpg"
'test redimensionnement image
With objdoc2.objselection.InlineShapes
.LockAspectRatio = msoTrue
If .Width > .Height Then
.Width = 20
Else
.Height = 20
End If
End With |
Ca bloque sur la ligne 4
Si vous avez la solution, je suis preneur
Merci bcp par avance
Daniel