|
楼主 |
发表于 2023-12-25 14:51
|
显示全部楼层
我的程序如下:
就是繁琐了。
- Sub 空格有下划线()
- Dim s As String
- s = "学校 "
- s = s & "班级 "
- s = s & "姓名 "
- s = s & "等级分 "
- Selection.TypeText Text:=s
-
- Selection.HomeKey Unit:=wdLine '光标移到到行首
- Selection.MoveRight Unit:=wdCharacter, Count:=Len(s), Extend:=wdExtend '选择到行尾
- Selection.Font.UnderlineColor = wdColorAutomatic
- Selection.Font.Underline = wdUnderlineSingle
-
- Selection.HomeKey Unit:=wdLine '光标移到到行首
- Selection.MoveRight Unit:=wdCharacter, Count:=2, Extend:=wdExtend '
- Selection.Font.Underline = wdUnderlineNone
-
- Selection.MoveRight Unit:=wdCharacter, Count:=13 '光标移到到指定位置
- Selection.MoveRight Unit:=wdCharacter, Count:=2, Extend:=wdExtend '
- Selection.Font.Underline = wdUnderlineNone
-
- Selection.MoveRight Unit:=wdCharacter, Count:=13 '光标移到到指定位置
- Selection.MoveRight Unit:=wdCharacter, Count:=2, Extend:=wdExtend '
- Selection.Font.Underline = wdUnderlineNone
-
- Selection.MoveRight Unit:=wdCharacter, Count:=13 '光标移到到指定位置
- Selection.MoveRight Unit:=wdCharacter, Count:=3, Extend:=wdExtend '
- Selection.Font.Underline = wdUnderlineNone
- End Sub
复制代码
|
|