The link provided by Jon Summers shows how to use the Area property of closed element types. I believe what he was suggesting is that you could adapt this to select linear elements and use the Length property of linear element types to get the individual distances. It is then up to you, the programmer, to keep a running total.
Something like this:
Dim elLine As LineElement
Dim dLengthTotal As Double
dLengthTotal = 0
'... code here retrieves line an individual line element
dLengthTotal = dLengthTotal + elLine.Length
Rod