Header avec un fond de couleur
Bonjour,
J'essaye de faire en sorte que mon header soit complètement avec une couleur de fond. J'y arrive avec le code suivant. Par contre, impossible de faire passer mon rectangle sous le texte.
Si quelqu'un à une idée :( (le "selection.ShapeRange.WrapFormat = wdWrapBehind" produit une erreur)
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13
| ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.TypeText Text:="TEST"
Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
Selection.Font.Size = 16
Selection.Font.Bold = wdToggle
ActiveDocument.Sections(1).Headers(wdHeaderFooterPrimary).Shapes.AddShape(msoShapeRectangle, 0, 0, ActiveDocument.PageSetup.PageWidth, 50).Select
With Selection
.ShapeRange.WrapFormat = wdWrapBehind
End With
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument |