*Function TVToClip Lparameters toTV Local lnIndex,lnLastIndex _Cliptext='' With toTV lnIndex = .Nodes(1).Root.FirstSibling.Index lnLastIndex = .Nodes(1).Root.LastSibling.Index _GetSubNodes(m.lnIndex,m.toTV,m.lnIndex) Do While m.lnIndex # m.lnLastIndex lnIndex = .Nodes(m.lnIndex).Next.Index _GetSubNodes(m.lnIndex,m.toTV,m.lnIndex) Enddo EndWith Return _Cliptext Function _GetSubNodes Lparameters tnIndex, toTV, tnRootIndex Local lnIndex, lnLastIndex With m.toTV WriteNode(m.tnIndex,m.toTV, m.tnRootIndex) If .Nodes(m.tnIndex).Children > 0 lnIndex = .Nodes(m.tnIndex).Child.Index lnLastIndex = .Nodes(m.tnIndex).Child.LastSibling.Index _GetSubNodes(m.lnIndex,m.toTV,m.tnRootIndex) Do While m.lnIndex # m.lnLastIndex lnIndex = .Nodes(lnIndex).Next.Index _GetSubNodes(m.lnIndex,m.toTV,m.tnRootIndex) Enddo Endif Endwith Function WriteNode Lparameters tnCurIndex, toTV,tnRootIndex Local lnRootIndex, lnIndex, lcPrefix, lcKey, lnLevel lnIndex = m.tnCurIndex With toTV lcPrefix = '+-' + .Nodes(m.lnIndex).Text lnLevel = 0 Do While m.lnIndex # m.tnRootIndex lnIndex = .Nodes(m.lnIndex).Parent.Index lcPrefix = Iif(.Nodes(m.lnIndex).LastSibling.Index = m.lnIndex,' ','|')+Space(3)+m.lcPrefix lnLevel = m.lnLevel + 1 EndDo _Cliptext = _Cliptext + m.lcPrefix + Chr(13) EndwithCetin