![]() |
#1
|
|||
|
|||
![]()
Hi, I have a document where there are floating shapes (text boxes). I wrote the following macro to adjust these text boxes.
Code:
Sub Textbox() Dim i As Integer Dim sh As ShapeRange Set sh = ActiveDocument.Range.ShapeRange For i = 1 To ActiveDocument.Shapes.Count If sh(i).Type = 17 And sh(i).AutoShapeType = 1 Then sh(i).Select With Selection.ShapeRange .RelativeHorizontalPosition = wdRelativeHorizontalPositionLeftMarginArea .RelativeVerticalPosition = wdRelativeVerticalPositionPage .RelativeHorizontalSize = wdRelativeHorizontalSizeMargin .RelativeVerticalSize = wdRelativeVerticalSizeMargin .Left = CentimetersToPoints(1.7) .LeftRelative = wdShapePositionRelativeNone .TopRelative = wdShapePositionRelativeNone .WidthRelative = wdShapeSizeRelativeNone .HeightRelative = wdShapeSizeRelativeNone .LockAnchor = True .TextFrame.WordWrap = True .RelativeVerticalPosition =WdRelativeVerticalPosition.wdRelativeVerticalPositionParagraph End With End If Next End Sub Thanks, Bikram |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Keeping comment anchors colored | mstratil | Word | 2 | 11-22-2021 09:19 AM |
![]() |
jeffreybrown | Word VBA | 2 | 05-06-2016 04:27 AM |
![]() |
cgp1689 | Word | 3 | 10-14-2015 07:34 AM |
![]() |
BruceM | Word VBA | 1 | 03-10-2015 08:20 AM |
Funky connector behavior with newly added anchors | koz | PowerPoint | 0 | 12-05-2012 01:28 PM |