R
Rick Charnes
I have a word document with several sections, and First Page and Primary
Headers in all sections. I want set both headers of Section 2 to "Link
to Previous". This code used to work:
Selection.GoTo what:=wdGoToSection, Which:=wdGoToFirst, Count:=2
ActiveWindow.ActivePane.View.SeekView = wdSeekFirstPageHeader
Selection.HeaderFooter.LinkToPrevious = True
ActiveWindow.ActivePane.View.SeekView = wdSeekPrimaryHeader
Selection.HeaderFooter.LinkToPrevious = True
....but for some reason all of a sudden the 'wdSeekPrimaryHeader' command
(4th line above) is now taking me to the FIRST PAGE HEADER of SECTION 3,
instead of the Primary Header of Section 2. Any idea why that might be?
Is there a better way to write this?
Headers in all sections. I want set both headers of Section 2 to "Link
to Previous". This code used to work:
Selection.GoTo what:=wdGoToSection, Which:=wdGoToFirst, Count:=2
ActiveWindow.ActivePane.View.SeekView = wdSeekFirstPageHeader
Selection.HeaderFooter.LinkToPrevious = True
ActiveWindow.ActivePane.View.SeekView = wdSeekPrimaryHeader
Selection.HeaderFooter.LinkToPrevious = True
....but for some reason all of a sudden the 'wdSeekPrimaryHeader' command
(4th line above) is now taking me to the FIRST PAGE HEADER of SECTION 3,
instead of the Primary Header of Section 2. Any idea why that might be?
Is there a better way to write this?