Changing Column for just a selection RRS feed

  • Question

  • Hi,

    I have a two column document that has to have some text in the at the end of the document and the center of the page.  I recorded a macro to see what the code would be to change the text from two columns to one, but actually running the macro turns the whole document from two columns to one.  I can see that the text is the current selection.  Any info would be appreciated.

    Current code:

    Selection.GoTo What:=wdGoToBookmark, Name:="aftrlastPage"
            Selection.InsertBreak Type:=wdLineBreak
            Selection.InsertBreak Type:=wdLineBreak
            Selection.InsertAfter "END OF DOCUMENT"
    'Generated code from Recorded Macro
            With Selection.PageSetup.TextColumns
            .SetCount NumColumns:=1
            .EvenlySpaced = True
            .LineBetween = False
            .Width = InchesToPoints(3.18)
            End With
            Selection.ParagraphFormat.Alignment = wdAlignParagraphCenter
            Selection.Style = ActiveDocument.Styles("Heading 1")

    • Edited by BenSwitzer Wednesday, July 3, 2013 3:43 PM
    Wednesday, July 3, 2013 3:41 PM


  • I figured it out.  Instead of doing two wdLineBreaks, I just did a single wdSectionBreakContinuous and it behaved correctly.
    • Marked as answer by BenSwitzer Wednesday, July 3, 2013 4:28 PM
    Wednesday, July 3, 2013 4:28 PM

All replies