Bonjour j'ai cette macro sous word et je voudrais qu'elle s'execute en boucle sachant que je peut avoir entre 1 et 24 document à exécuter. J' ai mis un raccoursi clavier ALT + A que j'execute pour chaque document, je voudrais faire une seul fois ALT + A pour tout les document word ouvert, merci d avance pour votre aide
Sub tabullation()
'
' tabullation Macro
' Macro enregistrée le 26/12/2008 par KZBGCY?
'
With ActiveDocument.PageSetup
.LineNumbering.Active = False
.Orientation = wdOrientPortrait
.TopMargin = CentimetersToPoints(2.5)
.BottomMargin = CentimetersToPoints(1.28)
.LeftMargin = CentimetersToPoints(2)
.RightMargin = CentimetersToPoints(2)
.Gutter = CentimetersToPoints(0)
.HeaderDistance = CentimetersToPoints(1.27)
.FooterDistance = CentimetersToPoints(1.27)
.PageWidth = CentimetersToPoints(21)
.PageHeight = CentimetersToPoints(29.7)
.FirstPageTray = wdPrinterUpperBin
.OtherPagesTray = wdPrinterUpperBin
.SectionStart = wdSectionContinuous
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.VerticalAlignment = wdAlignVerticalTop
.SuppressEndnotes = False
.MirrorMargins = False
.TwoPagesOnOne = False
.GutterPos = wdGutterPosLeft
End With
Selection.MoveDown Unit:=wdLine, Count:=40
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeParagraph
ActiveDocument.PrintOut
ActiveDocument.Save
ActiveWindow.Close
End Sub
Sub tabullation()
'
' tabullation Macro
' Macro enregistrée le 26/12/2008 par KZBGCY?
'
With ActiveDocument.PageSetup
.LineNumbering.Active = False
.Orientation = wdOrientPortrait
.TopMargin = CentimetersToPoints(2.5)
.BottomMargin = CentimetersToPoints(1.28)
.LeftMargin = CentimetersToPoints(2)
.RightMargin = CentimetersToPoints(2)
.Gutter = CentimetersToPoints(0)
.HeaderDistance = CentimetersToPoints(1.27)
.FooterDistance = CentimetersToPoints(1.27)
.PageWidth = CentimetersToPoints(21)
.PageHeight = CentimetersToPoints(29.7)
.FirstPageTray = wdPrinterUpperBin
.OtherPagesTray = wdPrinterUpperBin
.SectionStart = wdSectionContinuous
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.VerticalAlignment = wdAlignVerticalTop
.SuppressEndnotes = False
.MirrorMargins = False
.TwoPagesOnOne = False
.GutterPos = wdGutterPosLeft
End With
Selection.MoveDown Unit:=wdLine, Count:=40
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeParagraph
Selection.TypeParagraph
ActiveDocument.PrintOut
ActiveDocument.Save
ActiveWindow.Close
End Sub