![]() |
#1
|
|||
|
|||
![]()
Hi,
My document has got multiple sections so i need to create footer to each section. If the same section has got multiple pages then same footer for that section has to carry forward and keep the same. Can some one help me using vba code. I tried doing manually on the word using linktoPrevious but not that much effective. I tried the following code but using linktopreious = false it only works for footer on one page in that section not applying footer for multiple pages in that section. currentSection = Selection.Information(wdActiveEndSectionNumber) Selection.TypeParagraph Selection.MoveUp Unit:=wdLine, Count:=1 Selection.InsertBreak Type:=wdSectionBreakNextPage Selection.Style = ActiveDocument.Styles(styleEYHeading1) Selection.TypeText text:=sMySec currentSection = Selection.Information(wdActiveEndSectionNumber) With ActiveDocument.Sections(currentSection) .Footers(wdHeaderFooterFirstPage).LinkToPrevious = False .Footers(wdHeaderFooterPrimary).LinkToPrevious = False .Footers(wdHeaderFooterEvenPages).LinkToPrevious = False .Footers(wdHeaderFooterEvenPages).LinkToPrevious = False WordBasic.ViewFooterOnly Selection.TypeText text:=sMySec Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument End With Thank you for your help. SDondeti |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
![]() |
khsharpe | Word | 2 | 04-21-2011 02:49 AM |
Different Colors for Each Section? | l1willia | Word | 0 | 12-30-2010 11:49 AM |
Section Breaks, maybe? | R20 | Word | 2 | 12-20-2009 06:35 PM |
Section Breaks | glenws | Word | 1 | 11-05-2009 02:10 PM |
Section Break ODD | Manolo | Word | 0 | 04-29-2009 11:06 PM |