CanvasShapes.AddTextbox (Word)

Ajoute une zone de texte à une zone de dessin.

AddTextbox (Orientation, Left, Top, Width, Height)


Sub NewCanvasTextbox() 
 Dim docNew As Document 
 Dim shpCanvas As Shape 
 
 'Create a new document and add a drawing canvas 
 Set docNew = Documents.Add 
 Set shpCanvas = docNew.Shapes.AddCanvas _ 
 (Left:=100, Top:=75, Width:=150, Height:=200) 
 
 'Add a text box to the drawing canvas 
 shpCanvas.CanvasItems.AddTextbox _ 
 Orientation:=msoTextOrientationHorizontal, _ 
 Left:=1, Top:=1, Width:=100, Height:=100 
End Sub

Arguments

Les arguments nommés :

Orientation (Office.MsoTextOrientation) - Orientation du texte.

Left (Single) - Position, exprimée en points, du bord gauche de la zone de texte.

Top (Single) - Position, exprimée en points, du bord supérieur de la zone de texte.

Width (Single) - Largeur, exprimée en points, de la zone de texte.

Height (Single) - Hauteur, exprimée en points, de la zone de texte.