![]() PageSetup.FooterDistance = CentimetersToPoints(1.9)Ĭan you help me out with some examples or working code? The above shows my concept in the most simple way, but tbh I have no experience with creating word macros. PageSetup.HeaderDistance = CentimetersToPoints(1.9) PageSetup.BottomMargin = CentimetersToPoints(3.17) PageSetup.TopMargin = CentimetersToPoints(3.17) Line Spacing Select Home > More Paragraph Options > Line Spacing. Page Orientation To change orientation, select Layout > Orientation. ![]() Choose the margins you want or select Custom Margins to define your own. PageSetup.RightMargin = CentimetersToPoints(2.23) Change your document's layout to get it just the way you want. PageSetup.LeftMargin = CentimetersToPoints(2.21) PageSetup.FooterDistance = CentimetersToPoints(0.94)ĮlseIf PageSetup.Orientation = wdLandscapeOrientation Then PageSetup.HeaderDistance = CentimetersToPoints(0.96) Click on the Page Layout tab and then click on the Dialog Box Launcher, the small arrow in the bottom, right-hand corner of the Page Setup group. PageSetup.BottomMargin = CentimetersToPoints(2.21) PageSetup.TopMargin = CentimetersToPoints(2.23) ![]() PageSetup.RightMargin = CentimetersToPoints(3.17) Click Yes to apply the new margins to all new documents. Set the new margins that you would like to make the default and click Set As Default. PageSetup.LeftMargin = CentimetersToPoints(3.17) To change Words default page margins, click on the Page Layout tab and click on the Page Setup dialog box button as shown in the screenshot below. Here is what I got so far, but it does only change the Margins to ones from Landscape setup and disregards the header/footer: If PageSetup.Orientation = wdOrientPortrait Then What I want to achieve is a macro that would go through the currently opened document, check the orientation of each of the sections and adjust the Margins/Headers/Paper Size (which are different depending on whether the page is portrait or landscape) There are given restrictions on what should be the dimensions of margins size for Portrait and Landscape orientation. You may find that the default page layout settings in Word are not sufficient for the document you wish to create, in which case you will want to modify thos. On my position we are likely to format check documents that contain numerous sections due to change of page orientation.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |