With Selection.Find
.Text = "^13[A-Z][!^13]@[a-z]. [A-Z]"
.Wrap = wdFindStop
.Forward = True
.MatchWildcards = True
Do
.Execute
If Not .Found Then
Exit Do
Else
Dim myrange As Range
Set myrange = ActiveDocument.Range(Selection.Range.Start + 1, Selection.End - 3)
myrange.Select
If InputBox("Is this ncbi?", "NCBI", "yes", 300, 300) = "yes" Then
Call layout_feifei_liu.sFormatBibtexName
End If
Selection.Collapse wdCollapseEnd
End If
Loop
End With
Sub Macro5()
i = 1
Do While (i < 150)
Do
Selection.MoveEndUntil ","
If existTitle(Selection.Text) = False Then
oriL = Len(Selection.Text)
Selection.MoveRight wdCharacter, 2, wdExtend
Selection.MoveEndUntil ","
nowL = Len(Selection.Text)
Else
Selection.MoveLeft wdCharacter, nowL - oriL, wdExtend
Selection.MoveRight wdCharacter, 1, wdExtend
If InputBox("Is this ncbi?", "NCBI", "yes", 300, 300) = "yes" Then
Call layout_feifei_liu.sFormatBibtexName
End If
Exit Do
End If
Loop
Selection.Move 4
i = i + 1
Loop
End Sub