5

I am still a beginner with this. Can you tell my why this is not formatting the selection?

Selection.TypeText "title"

With Selection

        .Font.Bold = True
        .Font.Name = "Arial"
        .Font.ColorIndex = wdDarkBlue
        .ParagraphFormat.Alignment = wdAlignParagraphCenter
        .ParagraphFormat.SpaceAfter = 0
End With

1 Answer 1

5

It does format the text, but only text added after the With Selection command.

Change the order, put Selection.TypeText "title" last, and it will work. :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.