Bonjour,

j'ai un bout de code (qui marche bien) que j'ai optimisé le plus possible en fonction de mes connaissances, mais le temps d'exécution est encore assez long (dans une boucle 50 fois)

pText = N° de la ligne concernée (integer)
heighText = 300 (integer)

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
img.Shapes("Image 4").Copy
            pdfi.Range("C" & pText + 1).Select
            pdfi.Paste
            pdfi.Rows(pText).Select
            pdfi.Rows(pText).AutoFit
            pdfi.Rows(pText).RowHeight = pdfi.Rows(pText).RowHeight + 10
            pdfi.Rows(pText).VerticalAlignment = xlTop
            pdfi.Rows(pText + 1).RowHeight = heighText - pdfi.Rows(pText).RowHeight
Peut-on faire mieux ?