Word VBA All versions through Office 2003 -
The document being generated uses "Different first page" headers for early sections. Switching to deselect "Different first page" in a later new Section header causes previous headers to switch to also reflect the same change, or to mangle the previous header information.
The change to deselect "Different first page" header works properly if done manually using the mouse, but not programmatically. Even a macro created from mouse selections fails to work properly:
Selection.HeaderFooter.LinkToPrevious = False
With Selection.PageSetup
.HeaderDistance = InchesToPoints(0.5)
.FooterDistance = InchesToPoints(0.5)
.SectionStart = wdSectionNewPage
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.VerticalAlignment = wdAlignVerticalTop
End With
Is this a bug in Word, or am I doing something wrong? Thanks.
The document being generated uses "Different first page" headers for early sections. Switching to deselect "Different first page" in a later new Section header causes previous headers to switch to also reflect the same change, or to mangle the previous header information.
The change to deselect "Different first page" header works properly if done manually using the mouse, but not programmatically. Even a macro created from mouse selections fails to work properly:
Selection.HeaderFooter.LinkToPrevious = False
With Selection.PageSetup
.HeaderDistance = InchesToPoints(0.5)
.FooterDistance = InchesToPoints(0.5)
.SectionStart = wdSectionNewPage
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.VerticalAlignment = wdAlignVerticalTop
End With
Is this a bug in Word, or am I doing something wrong? Thanks.