D
Dan Kelly
We have a line in our footers that can be one of a preset number of colours,
which are picked from a combobox.
At the moment that following code works, but is broken if the user uses a
Section break.
Private Sub SetColour(r, g, b)
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.HeaderFooter.Shapes("Line 3").Select
Selection.ShapeRange.Line.ForeColor.RGB = RGB(176, 209, 55)
Selection.ShapeRange.Line.ForeColor.RGB = RGB(r, g, b)
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub
I need to be able to apply the above code (or at least the Selection
formatting) to every Footer in the document.
Any pointers?
which are picked from a combobox.
At the moment that following code works, but is broken if the user uses a
Section break.
Private Sub SetColour(r, g, b)
ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
Selection.HeaderFooter.Shapes("Line 3").Select
Selection.ShapeRange.Line.ForeColor.RGB = RGB(176, 209, 55)
Selection.ShapeRange.Line.ForeColor.RGB = RGB(r, g, b)
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument
End Sub
I need to be able to apply the above code (or at least the Selection
formatting) to every Footer in the document.
Any pointers?