Public Function HtmlFilter(htmlText, Label1, label2)
'返回html字符串lable1和最近的lable2标签中的数据
Dim pStart As Long, pStop As Long
'开始位置,结束位置
pStart = InStr(htmlText, Label1) + Len(Label1)
'找到标签信息的起始位置
If pStart > Len(Label1) Then
pStop = InStr(pStart, htmlText, label2)
If pStop - pStart <= 0 Then
HtmlFilter = ""
Else
HtmlFilter = Mid(htmlText, pStart, pStop - pStart)
End If
End If
End Function