Positioning


Shapes(1).GroupItems(2).IncrementTop(-1) 

Positioning Pictures and Objects

This is represented in VBA either by the InLineShape object or the Shape Object

ActiveDocument.InLineShapes.Item(4).WrappingStyle = 

The following can be used with inline shapes : inlinewithtext, square, tight


ActiveDocument.Shapes.Item(3).WrappingStyle = 

The following can be used with shapes: behind text, infront of text



Selection.ShapeRange(1).HeightRelative 
Selection.ShapeRange(1).WidthRelative
Selection.ShapeRange(1).LeftRelative
Selection.ShapeRange(1).TopRelative

For Absolute Position

Selection.ShapeRange(1).RelativeHorizontalPosition = wdRelativeHorizontalPosition.wdRelativeHorizontalPositionMargin 
Selection.ShapeRange(1).Left = 20

For Absolute Position

Selection.ShapeRange(1).RelativeHorizontalPosition = wdRelativeHorizontalPosition.wdRelativeHorizontalPositionLeftMarginArea 
Selection.ShapeRange(1).LeftRelative = 100

If the Vertical position is set to "Paragraph" then the object will move with text

Selection.ShapeRange(1).RelativeVerticalPosition = wdRelativeVerticalPosition.wdRelativeVerticalPositionParagraph 
Selection.ShapeRange(1).RelativeVerticalPosition = wdRelativeVerticalPosition.wdRelativeVerticalPositionLine

If the Vertical position is set to anything else then the object will have a "fixed position on page"

Selection.ShapeRange(1).RelativeVerticalPosition = wdRelativeVerticalPosition.wdRelativeVerticalPositionPage 


Selection.ShapeRange(1).RelativeHorizontalSize = wdRelativeHorizontalSize. 
Selection.ShapeRange(1).RelativeVerticalSize = wdRelativeVerticalSize.




© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext