none
What does explicitly setting a section to one column mean? RRS feed

  • Question

  • I have the following in a DOCX file:

           <w:sectPr w:rsidR="008638FC">
              <w:type w:val="continuous"/>
              <w:pgSz w:w="12240" w:h="15840"/>
              <w:pgMar w:top="414" w:right="700" w:bottom="0" w:left="720" w:header="0" w:footer="0"
                w:gutter="0"/>
              <w:cols w:space="720" w:equalWidth="0">
                <w:col w:w="10820" w:space="0"/>
              </w:cols>
            </w:sectPr>
    

    What does this mean? The column width is the same as the body width (page width - margins).

    And in Word if I open the columns dialog, nothing is selected. Not one column, nothing.

    ??? - thanks - dave


    What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing

    Saturday, November 21, 2020 6:51 PM

Answers

  • Since you have equalWidth set to "0", Word takes what you have in the cols collection and builds columns to those w:w and w:space specifications. 

    The UI shows "presets" in the columns dialog. If you choose one of those it will build them with equalWidth according to which one you choose. But if you set the col width explicitly in XML then Word doesn't show a preset selected. If you want to see it selected, then don't specify the size of specific columns like this for one:

          <w:cols w:space="720"/>

    Or this for two: 

          <w:cols w:num="2" w:space="720"/>

    As far as which of the two wins when you set col w:w to greater than (page size - margins), the col width will exceed. So it wins.

    Does that help?

    Tom

    • Marked as answer by DavidThi808 Tuesday, November 24, 2020 12:19 PM
    Tuesday, November 24, 2020 5:11 AM
    Moderator

All replies

  • Hi Dave,

    Thank you for posting your question. One of our engineers will respond by Monday at the latest.

    Best regards,


    Jeff McCashland | Microsoft Protocols Open Specifications Team

    Saturday, November 21, 2020 7:22 PM
    Moderator
  • Hi Dave, 

    I'll look into this for you. Do you have an example of the document?

    Best regards,
    Tom Jebo
    Sr Escalation Engineer
    Microsoft Open Specifications

    Monday, November 23, 2020 11:31 PM
    Moderator
  • Hi Tom;

    Unfortunately I can't send it - it's a confidential document of one of our customers. However, I don't need you to look at it, I just need you to tell me what it means. In the document they gave us, the single column's width matched the width of the page width after margins were subtracted. So it looked the same.

    But my question is, if those disagree, who is supposed to win? Or should the column settings be ignored if they are for 1 column?

    thanks - dave


    What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing

    Monday, November 23, 2020 11:37 PM
  • Since you have equalWidth set to "0", Word takes what you have in the cols collection and builds columns to those w:w and w:space specifications. 

    The UI shows "presets" in the columns dialog. If you choose one of those it will build them with equalWidth according to which one you choose. But if you set the col width explicitly in XML then Word doesn't show a preset selected. If you want to see it selected, then don't specify the size of specific columns like this for one:

          <w:cols w:space="720"/>

    Or this for two: 

          <w:cols w:num="2" w:space="720"/>

    As far as which of the two wins when you set col w:w to greater than (page size - margins), the col width will exceed. So it wins.

    Does that help?

    Tom

    • Marked as answer by DavidThi808 Tuesday, November 24, 2020 12:19 PM
    Tuesday, November 24, 2020 5:11 AM
    Moderator
  • yes, thank you

    What we did for the last 6 months - Made the world's coolest reporting & docgen system even more amazing

    Tuesday, November 24, 2020 12:19 PM