How can I get alignment from a textfield using uno?

Hello everyone,

I’m using the uno-library and want to replace an textfield with an image. The replacing worked correct, but the alignment of the image is not the same like from the textfield. I set the alignment with an defaultvalue like this, but I need the correct one from the textfield:

xPropSet.setPropertyValue(“HoriOrient”, new Any(HoriOrientation.LEFT));

How can I get the alignment form a textfield?

Thanks Peter

Better is upload the ODT with example. You need to get TextField as object in macro and get the alignment property of this object, but I’m not sure if it is possible only via uno commands.

Is your image retrieved from some database? In which case, manipulating it with macros is convenient and legitimate.
Otherwise if it is a “fixed” image (=a “permanent” illustration in your text), it is much better to use a frame style to control its properties (location within page, size, alignment, wrap, border, relation to text, …).