![]() |
#1
|
|||
|
|||
![]()
Hello!
I have used the macro recorder to change the page size of a document to A4 but I got the largest code ever to do this simple change. Is there any way to change page without the need of including such large lines of code? This is what I got from the macro recorder: Sub Macro1() ' ' Macro1 Macro ' ' With Selection.PageSetup .LineNumbering.Active = False .Orientation = wdOrientPortrait .TopMargin = CentimetersToPoints(2.5) .BottomMargin = CentimetersToPoints(2.5) .LeftMargin = CentimetersToPoints(3) .RightMargin = CentimetersToPoints(3) .Gutter = CentimetersToPoints(0) .HeaderDistance = CentimetersToPoints(1.25) .FooterDistance = CentimetersToPoints(1.25) .PageWidth = CentimetersToPoints(21) .PageHeight = CentimetersToPoints(29.7) .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 .SectionDirection = wdSectionDirectionLtr .LayoutMode = wdLayoutModeDefault End With End Sub |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Custom page size - Page color not covering entire page when converting to PDF | icor1031 | Word | 9 | 12-09-2019 08:21 PM |
Change page size reducing both margins | WizardDani | Word | 1 | 01-04-2018 06:41 AM |
![]() |
Ron Wolpa | Word | 4 | 08-18-2016 06:43 PM |
![]() |
tyger330 | Word | 9 | 12-19-2012 07:50 AM |
![]() |
kkepo | Word | 4 | 08-28-2012 08:53 PM |