开发者

Margins in Dynamically Created Word Document

I have a piece of accountancy software that exports data into a Word document. I ca开发者_如何学Pythonn create a specific template for each customer in Word 2007.

I need a way to set margins from the top of the page on all pages except the first.

The problem is I don't know in advance how many pages the document will be, but often between 1-3.


You can follow this tutorial.

I'll give the main steps here just in case but you'd better have a look at the link above:

Set a Different First Page

  1. Start with a blank Word document.
  2. Change the Margins (Page Layout tab, Page Setup group, Margins) to what the second page and following pages should be.
  3. Choose Edit Header. (Insert tab, Header & Footer, Header, Edit Header)
  4. In Header & Footer Tools, Design tab, Options, check Different First Page.

Create the First Page Margins

You are not really setting margins, you’re manipulating other Word features to act like margins.

Top and Bottom Margins

  1. Go into the header or footer on the first page.
  2. Change the top or bottom margins.

    • The quick way is to push your Enter key as many times as you need to create the distance for the margin spacing – turn on the Ruler and watch the left side ruler to get the distance close to what you want. Remember that by default the header or footer starts one-half inch from the edge of the page, so if you need a 2 inch top margin, the header will be 1.5 inches tall.

    • The more precise way would be to change the Paragraph Spacing (Home tab, Paragraph group, Paragraph dialog box). Paragraph Spacing appears measured in points, but you can type in 1″ or 1.5″ and Word will convert it to points for you (36 points is one-half inch, 72 points is one inch, 144 points would be two inches). Set the After spacing to whatever distance you need. To increase the bottom margin, set the Before: paragraph spacing for the footer.

Left and Right Margins

If you need the left or right margins wider, insert a borderless, empty text box into the header of the first page. If you need both the left and right margins wider, you’ll add two text boxes, one for each side.

  1. In the header on the first page, in the Insert tab, Text group, Text Box, Draw Text Box.
  2. Click and drag to draw the text box from the header all the way down to the footer.
  3. Right-click on the text box, choose Format Text Box. In the Colors & Lines tab, set the Line Color to none, to get rid of the border on the text box.
  4. If you know you want the left margin to be two inches wide, go into the Size tab and set the Text Box Width to two inches. Position the text box at the very edge of the page and the text box will create the look of a two inch left margin.
  5. In the Text Box Tools, Format tab, Arrange group, Text Wrapping, set the wrapping to Square.
  6. If you need to change the right margin, could copy and paste the text box you just created, and move it to the right side of the page.
  7. Close out of the header or footer on the first page.

Regards,

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜