Hello all, haven't been here for a while.
I have built a little something that might be useful to someone, but also have a technical question related to text lines.
Basically it's a custom bullet engine - you pick a text shape, then pick another shape and this shape gets distributed at the start of each line, here's an example:

Pick the text, start the macro, pick the custom bullet shape and get this:
Now my question is - is there a decent way to distinguish line types, whether they end "naturally" or by hand. The result would be "proper" bulleting, like this:
The text operations seem to be my Achilles' heel so the solution isn't too obvious.
Here's the code (pardon the terrible If...then blocks):
Code:
'TextLineRects part Courtesy of janga on CorelDRAW forums
Sub CustomBullets()
If CheckDoc(True) Then
Dim S As Shape
Dim D As Shape
Dim line As TextRange
Dim X As Double
Dim Y As Double
Dim Good As Boolean
Dim ShiftX As Double
Dim ShiftY As Double
ShiftX = -10
ShiftY = 0
Set S = ActiveSelection.Shapes.First
If S.Type = cdrTextShape Then
Good = ActiveDocument.GetUserClick(X, Y, 0, 10, False, cdrCursorEyeDrop)
If Not Good Then
Set D = ActivePage.SelectShapesAtPoint(X, Y, True).Shapes.Last
If Not D Is Nothing Then
'boostStart "Custom Bullets"
ActiveDocument.Unit = cdrMillimeter
For Each line In S.text.Story.Lines
' redimension the TextRange to recalculate the dimensions
line.SetRange line.Start, line.Start
X = line.TextLineRects.BoundingBox.Left
Y = line.TextLineRects.BoundingBox.CenterY
Set S = D.Duplicate
D.CenterX = X + ShiftX
D.CenterY = Y + ShiftY
Next
'boostFinish True
End If
End If
End If
End If
End Sub