Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Need help aligning text using VBA

Status
Not open for further replies.

jrice174

Civil/Environmental
Nov 8, 2004
129
I'm trying to center a string of text in a rectangle. When I add the text it goes almost where I want it, but then when I add the alignment properties, it throws it down in the corner. What am I doing wrong?

Pt1(0) = PWidth / 2: Pt1(1) = Hieght / 2
Set objText = ThisDrawing.ModelSpace.AddText(Name, Pt1, 1)
objText.InsertionPoint = Pt1
objText.Alignment = acAlignmentMiddleCenter
 
Replies continue below

Recommended for you

Try setting your alignment first, then resetting the insertion point.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor