Text justification

#1
I am working on a bill of materials project and have a problem.
How can I control the justification of text?
It seems to default to bottom-left, but I need it middle justified on some columns and left-middle on others.
Also after writing a row of text how can I specify the insertion point for the next row, changing the y-value a certain amount at each row while leaving the x-value the same.

#2
You will need to calculate the location point yourself, no justification available.

Steps involved:

1/ Insert the text in the drawing
2/ Obtain the bounding box for the text (this will give you the lower left and the upper right points)
3/ Calculate the new insertion point.
4/ Move the text.

To find the next point to insert text use

Sub TestText()

Dim objText As Text
Dim TextPoint As Point
Dim NewTextPoint As Point
Dim TextHt As Double
Dim strText As String
Dim I As Integer

strText = "Some Text "

Set TextPoint = ThisDocument.Utility.GetPoint(, "Select Text Position")
TextHt = 10#
Set objText = ThisDocument.ModelSpace.AddText("Some Text 0", TextPoint, TextHt)
objText.Update

For I = 1 To 5
strText = strText & VBA.CStr(I)
Set TextPoint = Library.CreatePoint(TextPoint.x, TextPoint.y - (TextHt * 2), 0)
Set objText = ThisDocument.ModelSpace.AddText(strText, TextPoint, TextHt)
objText.Update
Next I

End Sub



------------------
Regards
John Finlay