Bonjour,

J'essaie de mettre une partie de mon document sur 2 colonnes par macro excel.

Mais quand il s’exécute, il met tout le document sur 2 colonnes.

si une âme charitable pouvait m'éclairer....

merci d'avance


voici mon code :

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
Set mydoc = appWrd.ActiveDocument
Set myrange = mydoc.Range(Start:=mydoc.Paragraphs(debcomp1 - 1).Range.Start, _
    End:=mydoc.Paragraphs(fincomp2).Range.End)
 
myrange.Select
 
   With appWrd.Selection.Font
    .ColorIndex = wdRed
   End With
 
   With appWrd.Selection.PageSetup.TextColumns
       .SetCount NumColumns:=1
       .EvenlySpaced = False
       .LineBetween = False
   End With
 
    appWrd.Selection.PageSetup.TextColumns.Add Width:=CentimetersToPoints(7.38), _
        Spacing:=CentimetersToPoints(1.25), EvenlySpaced:=False