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
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