Aligner le texte d'un label

al -  
f894009 Messages postés 17417 Date d'inscription   Statut Membre Dernière intervention   -
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

  1. f894009 Messages postés 17417 Date d'inscription   Statut Membre Dernière intervention   1 717
     
    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