Results 1 to 2 of 2
  1. #1
    3 Star Lounger rcbjr2's Avatar
    Join Date
    Jan 2001
    Location
    Matthews, NC
    Posts
    279
    Thanks
    6
    Thanked 1 Time in 1 Post

    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?

    Thanks.

  2. #2
    3 Star Lounger rcbjr2's Avatar
    Join Date
    Jan 2001
    Location
    Matthews, NC
    Posts
    279
    Thanks
    6
    Thanked 1 Time in 1 Post
    I think I found the answer. Using the following works (vBox is my Shape):

    Code:
       With vBox
            .RelativeHorizontalPosition = wdRelativeHorizontalPositionOuterMarginArea
            .Left = wdShapeRight
            .RelativeVerticalPosition = wdRelativeVerticalPositionPage
            .Top = wdShapeTop
        End With
    As sometimes happens, I figured it out after posting the question.

    Thanks.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •