macro to align text vertically center in a textbox(shape)

M

madhu

Hi,
I want to write a macro to align text vertically center in a
textbox(shape) just like in a table, this textbox can contain smple text or
field equations like {EQ \I(1,2,3)} and even image.
My idea is to get the height of the image and height of textbox, basing
on these two heights I set the top margin of textbox, my data in text box is
always single line. This is fine as long as I have image.
Now my question is how to get the height of field equation? or Is there
any better logic to acheive this alignment ?
 
K

Klaus Linke

madhu said:
Hi,
I want to write a macro to align text vertically center in a
textbox(shape) just like in a table, this textbox can contain smple text
or
field equations like {EQ \I(1,2,3)} and even image.
My idea is to get the height of the image and height of textbox, basing
on these two heights I set the top margin of textbox, my data in text box
is
always single line. This is fine as long as I have image.
Now my question is how to get the height of field equation? or Is there
any better logic to acheive this alignment ?


Maybe put a 1×1 table in the text box, and set the vertical alignment to
centered?

Regards,
Klaus
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top