I am attempting to resize and reposition an existing fixed positioned text box however I’m having difficulties with:
I have textboxes that have fixed position and have vertical alignment set to either top or bottom. During an image mail merge, I find the owning textbox for the mail merge field and then resize and reposition the text box based on the image size.
How do I determine the text box vertical alignment as seen through the Format Shape dialog in Microsoft Word?
For example, the attached file contains image of document layout wherePHOTO_PATH2 merge field is within a text box that has its vertical alignment set to Bottom.
Through the non-public Shape property, I see the TextVerticalAlignment property is set as I expect:
textBox.TextBoxFormat.TextVerticalAlignment == VerticalAlignment.Bottom
However, I expected to use textBox.TextBoxFormat.VerticalAlignment property however it is always ‘None’:
textBox.TextBoxFormat.VerticalAlignment == ShapeVerticalAlignment.None
When adjusting the position of the text box, I expected to use the properties
I found that these properties are saved however they are not
reflected in the document when opened with Microsoft Word.
It appears that using the non-public Shape property does work as expected however it is not public: