Selection.MoveEndUntil (*)
Selection.MoveRight wdCharacter,2,wdExtend
Wend
commentWords = Selection.Words.Count
d = d + commentWords
Selection.Font.Color = wdColorGreen
Selection.MoveStart wdWord,commentWords
End If
' move the start of selection to next word
Selection.MoveStart wdWord
Wend
' prepare For set lIne number
Selection.MoveLeft wdWord,wordCount,wdExtend
SetLIneNumber
End Sub
Private Sub SetLIneNumber()
Dim lines As Integer
lines = Selection.Paragraphs.Count
Selection.StartOf wdParagraph
For l = 1 To lines
lIneNum = l
If l10 Then
lIneNum = lIneNum
End If
Selection.Text = lIneNum
Selection.Font.Bold = False
Selection.Font.Color = wdColorAutomatic
p = Selection.MoveDown(wdLine,1,wdMove)
Selection.StartOf wdLine
Next
End Sub
6、 选定代码文本,然后执行highlight脚本: 视图-宏- 选中SyntaxHighlight-运行,然后执行就可以了 。处理较长代码时需要一定时间,请耐心等待 。
注意事项: 处理前一定要对原文章进行备份,以免前功尽弃 。处理较长代码时需要一定时间,请耐心等待 。
经验总结扩展阅读
- ie无法使用怎么办【图文教程】
- 松伟吸顶灯怎么安装 松伟吸顶灯安装方法【详解】
- 快手安装不了怎么办
- 百叶窗储物柜怎么选购 百叶窗储物柜选购方法【详解】
- 惠普碳粉怎么样 惠普碳粉的热门型号价格及介绍【详解】
- 多功能干衣机怎么用 多功能干衣机使用方法
- 一加9r手机信号怎么样-支持哪些网络
- ps线稿图形该怎么整理线条
- 碧水源净水器怎么样 碧水源净水器优势介绍【详解】
- oppo手机号拉黑怎么恢复