DebraAnn
Thu Oct 27 11:50:51 CDT 2005
This worked awesome and solved two of my problems at the same time. I can't
thank you enough.
Thank you, thank you, thank you.
--
Debra Ann
"Jean-Guy Marcil" wrote:
> Debra Ann was telling us:
> Debra Ann nous racontait que :
>
> > Okay, I found some help from Doug Robbins on a previous thread that
> > used:
> >
> > With Selection.Sections(1)
> > .Headers(wdHeaderFooterPrimary).LinkToPrevious = False
> > .Footers(wdHeaderFooterPrimary).LinkToPrevious = False
> > End With
> >
> > I could use this, but how do I tell it to do the current section and
> > the following section? Can you do With Selection.Sections(Current)?
> >
> >
> >> To shut off my link to previous for the current page and then the
> >> next page, I did the following but it only shuts off the headers,
> >> not the footers. I get the same code when I follow my keystrokes.
> >> Why is this nor working?
> >>
> >> ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
> >> Selection.HeaderFooter.LinkToPrevious = Not _
> >> Selection.HeaderFooter.LinkToPrevious
> >> ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageFooter
> >> Selection.HeaderFooter.LinkToPrevious = Not _
> >> Selection.HeaderFooter.LinkToPrevious
> >> ActiveWindow.ActivePane.View.NextHeaderFooter
> >> Selection.HeaderFooter.LinkToPrevious = Not _
> >> Selection.HeaderFooter.LinkToPrevious
> >> ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader
> >> Selection.HeaderFooter.LinkToPrevious = Not
> >> Selection.HeaderFooter.LinkToPrevious
> >> ActiveWindow.ActivePane.View.PreviousHeaderFooter
> >> --
> >> Debra Ann
>
> Something like this (which also checks to make sure there is a section after
> the currently active one):
>
> '_______________________________________
> Dim CurSecIndex As Long
>
> CurSecIndex = Selection.Sections(1).Index
>
> With ActiveDocument.Sections(CurSecIndex)
> .Headers(wdHeaderFooterPrimary).LinkToPrevious = False
> .Footers(wdHeaderFooterPrimary).LinkToPrevious = False
> End With
>
> If CurSecIndex + 1 <= ActiveDocument.Sections.Count Then
> With ActiveDocument.Sections(CurSecIndex + 1)
> .Headers(wdHeaderFooterPrimary).LinkToPrevious = False
> .Footers(wdHeaderFooterPrimary).LinkToPrevious = False
> End With
> End If
> '_______________________________________
>
> --
> Salut!
> _______________________________________
> Jean-Guy Marcil - Word MVP
> jmarcilREMOVE@CAPSsympatico.caTHISTOO
> Word MVP site:
http://www.word.mvps.org
>
>
>