0
J'ai beaucoup de diapositives, chacune avec un seul mot d'art. Je souhaite aligner le mot art sur le centre absolu de la diapositive. le code que j'ai essayé est:Comment vba peut-elle être utilisée pour changer les positions verticales et horizontales d'objets, comme WordArt, dans PowerPoint?
Option Explicit
Sub format()
Dim sl As Slide
Dim ob As Object
For Each sl In ActivePresentation.Slides
For Each ob In sl.Shapes
With ob.TextFrame
' .TextRange.Paragraphs.ParagraphFormat.Alignment = ppAlignCenter
' .TextRange.Paragraphs.ParagraphFormat.Alignment = ppAlignMiddle
.HorizontalAnchor = msoAnchorCenter
.VerticalAnchor = msoAnchorMiddle
End With
Next ob
Next sl
End Sub
Merci Je vais essayer la prochaine fois que j'en ai besoin. –
Ça a marché un charme. Je vous remercie. –