ababenchrist
Board Regular
- Joined
- May 25, 2009
- Messages
- 230
I’m using Word2007 and I have a recorded macro that will insert an arrow into my repot that is a curtain size, color and style. The problem I’m having is when I run the macro it first bounces around the screen and then locates itself at the top of the page. How can I stop it from bouncing around and is it possible to have the arrow be inserted at location of curser.
I also have the same problem with a circle that I use
Here is my macro for arrow
I also have the same problem with a circle that I use
Here is my macro for arrow
Code:
Sub Macro2()
'
' Macro2 Macro
'
'
ActiveDocument.Shapes.AddConnector(msoConnectorStraight, 436.5, 125.35, _
0.65, 31.5).Select
Selection.ShapeRange.Line.EndArrowheadStyle = msoArrowheadTriangle
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 1.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.ConnectorFormat.Type = msoConnectorStraight
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(255, 0, 0)
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.Line.BeginArrowheadLength = msoArrowheadLengthMedium
Selection.ShapeRange.Line.BeginArrowheadWidth = msoArrowheadWidthMedium
Selection.ShapeRange.Line.BeginArrowheadStyle = msoArrowheadNone
Selection.ShapeRange.Line.EndArrowheadLength = msoArrowheadLengthMedium
Selection.ShapeRange.Line.EndArrowheadWidth = msoArrowheadWidthMedium
Selection.ShapeRange.Line.EndArrowheadStyle = msoArrowheadTriangle
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.Left = 436.3
Selection.ShapeRange.Top = 125.25
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.RelativeHorizontalSize = wdRelativeHorizontalSizePage
Selection.ShapeRange.RelativeVerticalSize = wdRelativeVerticalSizePage
Selection.ShapeRange.Left = InchesToPoints(0.11)
Selection.ShapeRange.LeftRelative = wdShapePositionRelativeNone
Selection.ShapeRange.Top = InchesToPoints(-0.01)
Selection.ShapeRange.TopRelative = wdShapePositionRelativeNone
Selection.ShapeRange.WidthRelative = wdShapeSizeRelativeNone
Selection.ShapeRange.HeightRelative = wdShapeSizeRelativeNone
Selection.ShapeRange.LockAnchor = False
Selection.ShapeRange.LayoutInCell = True
Selection.ShapeRange.WrapFormat.AllowOverlap = True
Selection.ShapeRange.WrapFormat.Side = wdWrapBoth
Selection.ShapeRange.WrapFormat.DistanceTop = InchesToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceBottom = InchesToPoints(0)
Selection.ShapeRange.WrapFormat.DistanceLeft = InchesToPoints(0.13)
Selection.ShapeRange.WrapFormat.DistanceRight = InchesToPoints(0.13)
Selection.ShapeRange.WrapFormat.Type = 3
Selection.ShapeRange.ZOrder 4
End Sub