文本格式:设置字符间距和水平缩放

使用Font对象的Spacing属性设置文本的字符间距。

code.vba
Sub Test()
  Dim doc As Document
  Set doc = Documents.Open("D:\test2.docx")
  Dim rng As Range
  Set rng = doc.Range(Start:=26, End:=34)
  rng.Font.Size = 20
  rng.Font.TextColor.RGB = wdColorGreen

  rng.Font.Spacing = 6
  rng.Font.Scaling = 200
End Sub

设置效果如图3-18所示。

Document Image

图3-18 修改字符间距