* 魏老师:我的代码不如您的高级,对付着用吧,未做优化,仅供参考:
- Sub test?????????_New()
- Dim i As Paragraph
- For Each i In ActiveDocument.Paragraphs
- If i.Range Like "#*" Then
- i.Range.Characters(InStr(i.Range.Text, ".")).Select
- Do
- sk:
- If Selection.Next = vbCr Then Exit Do
- If Selection.Next.Underline = wdUnderlineWavy Then
- Selection.MoveEnd
- Else
- Selection.Next.Delete
- Selection.InsertAfter Text:=" "
- GoTo sk
- End If
- Loop
- End If
- Next
- With ActiveDocument.Content.Find
- .Execute "([??.????])([ ??^s^t]{1,})", , , 1, , , , , , "\1", 2
- .Execute "([ ??^s^t]{1,})(^13)", , , 1, , , , , , "\2", 2
- End With
- ActiveDocument.Content.Copy
- ActiveDocument.Close savechanges:=wdDoNotSaveChanges
- Documents.Add.Content.Paste
- ActiveDocument.Characters(1).Copy
- MsgBox "OK! Not Saved! ?????δ????!!!!!!!!!!!!!!!!!!!!!", 0 + 16
- End Sub
复制代码 |