VERSION 1.0 CLASS BEGIN MultiUse = -1 'True Persistable = 0 'NotPersistable DataBindingBehavior = 0 'vbNone DataSourceBehavior = 0 'vbNone MTSTransactionMode = 0 'NotAnMTSObject END Attribute VB_Name = "Anchor" Attribute VB_GlobalNameSpace = False Attribute VB_Creatable = True Attribute VB_PredeclaredId = False Attribute VB_Exposed = False Attribute VB_Ext_KEY = "SavedWithClassBuilder6" ,"Yes" Attribute VB_Ext_KEY = "Top_Level" ,"Yes" Attribute VB_Ext_KEY = "Member0" ,"Link" 'local variable(s) to hold property value(s) Private mvarTitle As String 'local copy Private mvarlink As String 'local copy Private mvarNamePositionStart As Long 'local copy Private mvarNamePositionEnd As Long 'local copy Private mvarTitlePositionStart As Long 'local copy Private mvarTitlePositionEnd As Long 'local copy 'local variable(s) to hold property value(s) Private mvarIndex As Integer 'local copy Public Property Let Index(ByVal vData As Integer) 'used when assigning a value to the property, on the left side of an assignment. 'Syntax: X.Index = 5 mvarIndex = vData End Property Public Property Get Index() As Integer 'used when retrieving value of a property, on the right side of an assignment. 'Syntax: Debug.Print X.Index Index = mvarIndex End Property Public Property Let TitlePositionEnd(ByVal vData As Long) 'used when assigning a value to the property, on the left side of an assignment. 'Syntax: X.TitlePositionEnd = 5 mvarTitlePositionEnd = vData End Property Public Property Get TitlePositionEnd() As Long 'used when retrieving value of a property, on the right side of an assignment. 'Syntax: Debug.Print X.TitlePositionEnd TitlePositionEnd = mvarTitlePositionEnd End Property Public Property Let TitlePositionStart(ByVal vData As Long) 'used when assigning a value to the property, on the left side of an assignment. 'Syntax: X.TitlePositionStart = 5 mvarTitlePositionStart = vData End Property Public Property Get TitlePositionStart() As Long 'used when retrieving value of a property, on the right side of an assignment. 'Syntax: Debug.Print X.TitlePositionStart TitlePositionStart = mvarTitlePositionStart End Property Public Property Let NamePositionEnd(ByVal vData As Long) 'used when assigning a value to the property, on the left side of an assignment. 'Syntax: X.NamePositionEnd = 5 mvarNamePositionEnd = vData End Property Public Property Get NamePositionEnd() As Long 'used when retrieving value of a property, on the right side of an assignment. 'Syntax: Debug.Print X.NamePositionEnd NamePositionEnd = mvarNamePositionEnd End Property Public Property Let NamePositionStart(ByVal vData As Long) 'used when assigning a value to the property, on the left side of an assignment. 'Syntax: X.NamePositionStart = 5 mvarNamePositionStart = vData End Property Public Property Get NamePositionStart() As Long 'used when retrieving value of a property, on the right side of an assignment. 'Syntax: Debug.Print X.NamePositionStart NamePositionStart = mvarNamePositionStart End Property Public Property Let link(ByVal vData As String) 'used when assigning a value to the property, on the left side of an assignment. 'Syntax: X.Link = 5 mvarlink = vData End Property Public Property Get link() As String 'used when retrieving value of a property, on the right side of an assignment. 'Syntax: Debug.Print X.Link link = mvarlink End Property Public Property Let Title(ByVal vData As String) 'used when assigning a value to the property, on the left side of an assignment. 'Syntax: X.Title = 5 mvarTitle = vData End Property Public Property Get Title() As String 'used when retrieving value of a property, on the right side of an assignment. 'Syntax: Debug.Print X.Title Title = mvarTitle End Property Public Sub AddAnchor(strData As String) Dim anchorOpenBegin As Long Dim anchorOpenEnd As Long Dim anchorCloseBegin As Long Dim anchorCloseEnd As Long Dim anchorbody As String Dim Splitter As Variant Dim splitter1 As Variant Dim xCol As Collection Dim xa As Anchor Dim xlist As String Dim offset As Integer Dim beforRep As String Dim AfterRep As String strData = Replace(strData, vbCr, "") strData = Replace(strData, vbLf, "") While InStr(1, strData, " ") > 0 strData = Replace(strData, " ", " ") Wend anchorOpenBegin = InStr(1, strData, " 0 Set xa = New Anchor anchorOpenEnd = InStr(anchorOpenBegin, strData, ">") If anchorOpenEnd = 0 Then GoTo zzz anchorbody = Mid(strData, anchorOpenBegin, anchorOpenEnd - anchorOpenBegin) Splitter = Split(anchorbody, " ") For i = 0 To UBound(Splitter) If InStr(1, Splitter(i), "=") Then splitter1 = Split(Splitter(i), "=", 2) If splitter1(0) = "href" Then mvarlink = Replace(splitter1(1), Chr(34), "") End If End If Next anchorCloseBegin = InStr(anchorOpenEnd, strData, "") mvarTitlePositionStart = anchorOpenEnd + 1 mvarTitlePositionEnd = anchorCloseBegin anchorbody = Mid(strData, mvarTitlePositionStart, mvarTitlePositionEnd - mvarTitlePositionStart) mvarTitle = anchorbody DoEvents anchorOpenBegin = InStr(anchorOpenBegin + 1, strData, "{3}" link = Replace(link, "{2}", mvarAnchor) link = Replace(link, "{3}", mvarTitle) CompileLink = link ' written by IWiz mity@ropnet.ru End Function