Results 1 to 2 of 2
2014-11-26, 23:51 #1
Word 2010 Formatting Text Box Alignment w/Macro
I can insert a textbox using a macro with Shapes.AddTextBox, but the options are limited to Left, Top, Width, and Height. If I right-click the box, I get many more Position Layout options, including making the box horizontally align to the right relative to the outside margin. How can I do this in a macro? I ran across RelativeHorizontalPosition = wdRelativeHorizontalPositionOuterMarginArea may help, but I don't think it's exactly what I'm looking for. I can't find a specific option to Align or Position relative to the right margin. I'd also like to make it veritically align relative to top of the page. Any suggestions of additional options/methods to set these alignment properties for the inserted textbox?
2014-11-27, 00:05 #2
I think I found the answer. Using the following works (vBox is my Shape):
With vBox .RelativeHorizontalPosition = wdRelativeHorizontalPositionOuterMarginArea .Left = wdShapeRight .RelativeVerticalPosition = wdRelativeVerticalPositionPage .Top = wdShapeTop End With