Bonjour à tous,
J'aimerai créer une macro qui passe en revue toutes les textboxs de mon doc et qui modifie par exemple le positionnement du début des lignes.
voilà ce que je fais sur une textebox:
Et je voudrais une boucle qui couvre toutes les textboxs avec la même moficiation.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27 Sub Macro2() ' ' Macro2 Macro ' ' ActiveDocument.Shapes("Text Box 181").Select Selection.WholeStory With Selection.ParagraphFormat .LeftIndent = CentimetersToPoints(0) .SpaceBeforeAuto = False .SpaceAfterAuto = False End With With Selection.ParagraphFormat .SpaceBeforeAuto = False .SpaceAfterAuto = False .FirstLineIndent = CentimetersToPoints(1.2) End With With Selection.ParagraphFormat .SpaceBeforeAuto = False .SpaceAfterAuto = False .FirstLineIndent = CentimetersToPoints(0) End With Selection.ShapeRange.TextFrame.TextRange.Select Selection.Collapse Selection.ShapeRange.Select End Sub
Je pensais à un "For" avec un compeut "i" mais je ne maitrise pas...
Merci
Partager