|
Sub 汉字上方注拼音()'word2000
With Selection
If .End - .Start = 0 Then MsgBox "请先选择要注音的字符,你可能还没有选择任何字符。": Exit Sub
x = .Characters.Count
.MoveLeft
For I = 1 To x
t = Selection
s = Int(.Font.Size)
s2 = .Font.Name
On Error Resume Next
v = ActiveDocument.Variables(t).Value
If Err Then
.MoveRight
Err = 0
Else
.Fields.Add .Range, wdFieldEmpty, "EQ \* jc2 \* ""Font:" & t2 & """ \* hps" & 2 * s & " \o\ad(\s\up 12(" & v & ")," & t & ")", False
ActiveDocument.Fields(ActiveDocument.Fields.Count).ShowCodes = False
.Delete
End If
Next I
End With
End Sub
Sub 汉字右侧注拼音()
With Selection
If .End - .Start = 0 Then MsgBox "请先选择要注音的字符,你可能还没有选择任何字符。": Exit Sub
x = .Characters.Count
.MoveLeft
For I = 1 To x
t = Selection
On Error Resume Next
v = ActiveDocument.Variables(t).Value
If Err Then
.MoveRight
Err = 0
Else
.TypeText t & "(" & v & ")"
.Delete
End If
Next I
End With
End Sub
[ 本帖最后由 chuhaiou 于 2010-6-29 21:43 编辑 ] |
|