second line indent

Posted on 2006-04-20
Last Modified: 2008-02-26
points available only for solution. not for being informed it cant be done.
having said that:
i need a way to produce the type of paragraph format found in many books. where the first word of each paragraph is a larger size font. the first line is not indented, but the second line is indented to a variable amount, depending on the length of the first word of the paragraph. the third line and following lines are not indented.
Question by:rolo
    LVL 80

    Accepted Solution

    Hi rolo,
    Take a look at the Format...Drop Cap menu item. The default enlarges the size of the first letter. If you want the first word treated that way, you'll need to select the it before opening the menu item.

    LVL 80

    Expert Comment

    I tried unsuccessfully to turn the Drop Cap into a style so that it would occur automatically.

    But you could certainly record a macro that does it to each paragraph.

    Sub DropCapsEverywhere()
    Dim pg As Paragraph
    For Each pg In ThisDocument.Paragraphs
        If pg.Range.Characters.Count > 5 Then
            With pg.DropCap
                .Position = wdDropNormal
                .LinesToDrop = 2
                .DistanceFromText = InchesToPoints(0)
            End With
        End If
    End Sub

    1) ALT + F11 to open the VBA Editor
    2) CTRL + R to open the Project Explorer (if it isn't already open)
    3) Click the + sign to left of Microsoft Word Objects in your document in the Project Explorer (if it isn't already open)
    4) Double-click ThisDocument to open the code pane
    5) Paste the code there
    6) Return to the document with ALT + F11


    Author Comment

    thanx a ton, needs a bit tweaking but the idea works.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Join & Write a Comment

    The Selection object is designed for user interaction. It has a Range property, so it can be used in most places that a Range object can. Recorded macros must use the Selection because they are simply copying what the user is doing. A Range prope…
    This is written from a 'VBA for MS Word' perspective, but I am sure it applies to most other MS Office components where VBA is used.  One thing that really bugs me is slow code, ESPECIALLY when it's mine!  In programming there are so many ways to…
    This video shows where to find templates, what they are used for, and how to create and save a custom template using Microsoft Word.
    Office 365 is currently available in five editions. Three of them are for business use: Office 365 Business Essentials, Office 365 Business, and Office 365 Business Premium. Two of them are for home/personal use: Office 365 Home and Office 365 Perso…

    728 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

    25 Experts available now in Live!

    Get 1:1 Help Now