Aligner le texte d'un label

Fermé
al - 29 sept. 2015 à 18:17
f894009 Messages postés 17185 Date d'inscription dimanche 25 novembre 2007 Statut Membre Dernière intervention 15 avril 2024 - 30 sept. 2015 à 14:27
Bonjour,
Il s'agit d'un code vb qui pilote un ppt.

Je cherche à ce que le label qui est créé ait son texte aligné à gauche et pas centré (horizontalement) par défaut.
Merci beaucoup pour votre aide,



With presppt
Set Sh1 = .Slides(numsli).Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, Left:=35, Top:=235 + taille, Width:=120, Height:=100)
With Sh1.TextFrame.TextRange
.Text = ajoutref
With .Font
.Name = "Verdana"
.Size = 10
.Bold = msoCFalse
.Color.RGB = RGB(0, 0, 0)
End With
End With
End With
NbShpe = presppt.Slides(numsli).Shapes.Count


1 réponse

f894009 Messages postés 17185 Date d'inscription dimanche 25 novembre 2007 Statut Membre Dernière intervention 15 avril 2024 1 701
30 sept. 2015 à 14:27
Bonjour,

    With presppt
        Set Sh1 = .Slides(numsli).Shapes.AddTextbox(Orientation:=msoTextOrientationHorizontal, Left:=35, Top:=235 + taille, Width:=120, Height:=100)
        With Sh1.TextFrame.TextRange
            .Text = ajoutref
            .ParagraphFormat.Alignment = ppAlignCenter
            With .Font
                .Name = "Verdana"
                .Size = 10
                .Bold = msoCFalse
                .Color.RGB = RGB(0, 0, 0)
            End With
        End With
    End With
    NbShpe = presppt.Slides(numsli).Shapes.Count
1