Welcome to OpenXML Developer Sign in | Join | Help

(Info)Adding Line Numbers and Setting Columns in The Document

  •  10-30-2006, 8:47 AM

    (Info)Adding Line Numbers and Setting Columns in The Document

    This post would be giving the basic information of setting some properties in a document,such as introducing columns in the document or line numbers.

    1. Setting line numbers

    On setting this on,each of the lines in the document would be numbered.Done from Line Numbers  command of the  Page Setup  group of Page Layout tab.

    To number the lines in the page include this xml tag in the section of the document.

    <w:sectPr>

       <w:lnNumType w:countBy="1" w:restart="continuous" />

    </w:sectPr>

    here,'countBy="1"' would be the value by which the line number increments.

    'w:restart="continuous"',specifies when the line numbering in this section shall be reset to the line number specified by the start attribute's value.The line numbering increments for each line until it reaches the restart point specified by this element.

    Attribute,start specifies the starting value used for the first line

    If the value of attribute 'restart' is continuous ,it means Continue Line Numbering From Previous Section

    If newPage,Restart Line Numbering on Each Page

    and if,newSection ,Restart Line Numbering for Each Section

     

    2. The text of the document can also be split into 2 or more columns,go to Columns command of the  Page Setup  group of Page Layout tab,or in the section  of the document(document.xml), include,

          <w:cols w:num="2" w:space="720" w:equalWidth="0">

                        <w:col w:w="2820" w:space="720" />
                        <w:col w:w="6360" />
     
      </w:cols>
     
    'num' specifies,number of text columns in the current section.
    'space' specifies the spacing between text columns in the current section.
    'equalWidth' specifies whether all text columns in the current section are of equal width,here the column in the left is smaller compared to the the right column.
     
     

    Regards,

    Vijayeta

     

View Complete Thread