text 调整作者名和姓的顺序加评论
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text 调整作者名和姓的顺序加评论相关的知识,希望对你有一定的参考价值。
Sub 调整作者名加comment()
Dim myrange As Range
With selection.Find
.Text = "[A-Z][A-Za-z]{1,}\, [A-Z]\."
.MatchWildcards = True
.Wrap = wdFindStop
.Forward = True
Do
.Execute
If .Found And selection.Range.Previous(wdCharacter, 2) <> ")" Then
selection.MoveEndUntil ".,"
selection.MoveRight wdCharacter, 1, wdExtend
Set myrange = selection.Range
myrange.Select
myrange.SetRange Start:=selection.Range.Start + 1 + InStr(selection.Range, ","), End:=selection.Range.End
myrange.HighlightColorIndex = wdYellow
myrange.Comments.Add Range:=myrange, Text:="sss"
myrange.Cut
selection.collapse wdCollapseStart
selection.Paste
selection.TypeText " "
If selection.Range.Next = "," Then
selection.MoveRight wdCharacter, 1, wdExtend
Set myrange = selection.Range
myrange.Select
myrange.SetRange Start:=selection.Range.Start + 1 + InStr(selection.Range, ","), End:=selection.Range.End
myrange.HighlightColorIndex = wdYellow
myrange.Comments.Add Range:=myrange, Text:="sss"
myrange.Cut
selection.collapse wdCollapseStart
selection.Paste
selection.TypeText " "
End If
End If
Loop
End With
End Sub
以上是关于text 调整作者名和姓的顺序加评论的主要内容,如果未能解决你的问题,请参考以下文章
PostgreSQL 中连接名和姓的搜索优化
R语言使用quantile函数计算评分值的分位数(20%40%60%80%)使用逻辑操作符将对应的分位区间(quantile)编码为分类值生成新的字段strsplit函数将学生的名和姓拆分
第八场 hdu 6143 Killer Names(思维题)
Mongoose - 无法检索快速路线中的虚拟字段
怎样实现TreeView的TreeNode拖动功能,以调整TreeNode的顺序?(C#)
Facebook评论框移动版未调整大小