Maybe this can help You. Good luck.
Public Function GetTag(strText As String, strTag As String, strTagEnd As String, strControlLine As String) As String
Dim intStart As Long
Dim intEnd As Long
Dim intControlLine As Long
intControlLine = strControlLine
'
' Look for where the Tag starts
' If...