Align Static Text on Screen

Align Static Text on Screen

I create static text dynamically on screen with command: Dim obProject as Project Set obProject = MyWorkspace.ActiveDocument Dim obPicture as DynPicture Set obPicture = obProject.DynPicture.Item(0) Dim newElement as Element Set newElement = obPicture.Elements.Create("new_text", tpText) newElement.DynProperties("Text") = "Text 1" newElement.DynProperties("HorizontalAlign") = 0 '0 -> Left newElement.DynProperties("VerticalAlign") = 0 '0 -> Centered, 1 - > Bottom, 2 -> Top When I set 'HorizontalAlign' with value 0 the text alignment is Left, but, with value 1 or 2 not work. Whats values I need use for centered or right alignment?

This is a migrated post! Originally posted on 22.04.2019 by user celsothomaz. Please be aware that information can be outdated.