Word VBA textcolumns....

Posted on 2004-11-15
Last Modified: 2008-02-01

Now I am able to add columns. But if I add textcolumns that is getting applied to the title also. And so the title is going to the first column. But my document format should be like this....

                                                SUB TITLE

Feature One                                                                 Feature Three
    .Bullet One                                                                     .Bullet One
    .Bullet Two                                                                    .Bullet Two
    .Bullet Three                                                                  .Bullet Three

Feature Two                                                                Feature Four
    .Bullet One                                                                     .Bullet One
    .Bullet Two                                                                     .Bullet Two
    .Bullet Three                                                                  .Bullet Three

The column format should get apply only to the features and not to the title.
In a word document if I select only the features and say format>column it is spliting without affecting titles.
I am not able to do the same using VB code.
Hope I am clear.
Question by:amiteshsinha
    1 Comment
    LVL 76

    Accepted Solution

    This will create two columns for all the document, except for the first two paragraphs.

    Sub TwoColumnsBut2()
    Dim rng As Range
    Set rng = ActiveDocument.Range
    rng.Collapse wdCollapseStart
    rng.Expand wdParagraph
    rng.Collapse wdCollapseEnd
    rng.Expand wdParagraph
    rng.Collapse wdCollapseEnd
    rng.InsertBreak wdSectionBreakContinuous
        With ActiveDocument.Sections(2).PageSetup.TextColumns
            .SetCount NumColumns:=2
            .EvenlySpaced = True
            .LineBetween = False
            .Width = CentimetersToPoints(6.7)
            .Spacing = CentimetersToPoints(1.25)
        End With
    End Sub

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    There is a feature provided by MS Word that lets you create an Table of Contents for your Word document automatically. To use this feature for other documents there are two steps involved,   1.  Prepare your document for a table of contents (he…
    Introduction This tutorial provides instructions on how to properly format your Word document using the inbuilt tools provided. The benefits of using these tools means your documents are more accessible and easily portable to other applications an…
    This video teaches the viewer how to align pictures around text while keeping the text properly aligned in the document.
    In a previous video Micro Tutorial here at Experts Exchange (, I explained how to get a free, one-month trial of Office …

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    17 Experts available now in Live!

    Get 1:1 Help Now