Sub 取消网页链结()
x = ActiveDocument.Fields.count
Y = 0
If x >= 1 Then
For i = x To 1 Step -1
If InStr(1, ActiveDocument.Fields(i).Code, "http") > 0 Or InStr(1, ActiveDocument.Fields(i).Code, "mailto:") > 0 Then
ActiveDocument.Fields(i).Select
ActiveDocument.Fields(i).Unlink
Y = Y + 1
End If
Next
End If
MsgBox "当前文档共有" + Str(x) + " 处链结,取消了" + Str(Y) + "处网页链结!"
End Sub