Footer Page Numbers continued....

K

Kerry

Hi Harold

Many thanks for the restartnumbering=false tip. I have
entered the extra
command line in to my procedure but keep getting the
following error

Run time error 91 - object variable or with block
variable not set

please see my code below - have I just put the command in
the wrong place?? many thanks.
----------
Sub InsLscPgA3()
'Insert a Landscape Page
'On Error GoTo EndLine
Selection.InsertBreak Type:=wdSectionBreakNextPage

With Selection.PageSetup
.PaperSize = wdPaperA3
.LineNumbering.Active = False
.Orientation = wdOrientLandscape
.TopMargin = InchesToPoints(1.25)
.BottomMargin = InchesToPoints(1.25)
.LeftMargin = InchesToPoints(1)
.RightMargin = InchesToPoints(2.5)
.Gutter = InchesToPoints(0)
.HeaderDistance = InchesToPoints(0.49)
.FooterDistance = InchesToPoints(0.49)
.FirstPageTray = wdPrinterDefaultBin
.OtherPagesTray = wdPrinterDefaultBin
.SectionStart = wdSectionNewPage
.OddAndEvenPagesHeaderFooter = False
.DifferentFirstPageHeaderFooter = False
.VerticalAlignment = wdAlignVerticalTop
.SuppressEndnotes = False
.MirrorMargins = False
.TwoPagesOnOne = False
.BookFoldPrinting = False
.BookFoldRevPrinting = False
.BookFoldPrintingSheets = 1
.GutterPos = wdGutterPosLeft
End With
Selection.HeaderFooter.PageNumbers.RestartNumberingAtSecti
on = False
Exit Sub
EndLine:
MsgBox "Your printer will not allow A3 pages - change
your default print settings"
End Sub
 
L

Lynn Taylor

Kerry
You might have to go into the header first:
ActiveWindow.ActivePane.View.SeekView =
wdSeekCurrentPageHeader
then type
Selection.HeaderFooter.pagenumbers.RestartNumberingAtSecti
on = False
Activewindow.activepane.view.seekview = wdSeekMainDocument

Regards
Lynn
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top