以下是引用cat2123在2006-9-24 18:57:04的发言: 我将这句替换为:ActiveDocument.Content.Text = VBA.Join(myArray, vbCrLf),程序调试无误,但是并没有将满足条件的段落标记删除。 我理解错了。 再试一下这个: Option Explicit Sub Rep() Dim myString As String, myArray() As String, aArray As Variant Dim myText As String With ActiveDocument myString = .Content.Text myArray = VBA.Split(myString, Chr(13)) For Each aArray In myArray If Len(aArray) <= 150 And InStr(aArray, "Bibliographic Information-") > 0 Then Else myText = myText & aArray & Chr(13) End If Next .Content.Text = myText End With End Sub
|