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
4

1 回答 1

5

它确实格式化了文本,但只有在命令之后添加的文本。With Selection

更改顺序,放在Selection.TypeText "title"最后,它会起作用。:)

于 2012-11-15T15:58:24.523 回答