M
Mad Scientist Jr
see the macros below - paste these into a Word document
and run macro testDraw1 - it should work
a green blob dances around the screen
But try running the macro testDraw2
and you will see problems with lines like
ActiveDocument.Shapes("Line 5").Select
it seems when the line shape was created,
Word auto-enumerated some internal counter of that particular shape,
and auto-named the shape using that counter (ie "Line 5")
and if you try to play the macro later
that counter might be reset, and thus the shape name would be
different,
ie, what was "Line 5" when the macro was created, might be
"Line 2" for someone else playing back the macro.
and the macro won't work for playback
The answer would be to edit the macro to explicitly name the shape in a
line like
ActiveDocument.Shapes.AddShape(msoShapeOval, 86.25, 166.4, 61.85,
65.2). _
Select
This also is the case with group objects, for instance "myGroup"
ActiveDocument.Shapes.Range(Array("Oval 2", "Rectangle 3", "Line
4", _
"Line 5" _
, "Line 6", "Line 7")).Select
Selection.ShapeRange.Group.Select
so that later you can reference it with
ActiveDocument.Shapes("myGroup").Select
instead of some default name like
ActiveDocument.Shapes("Group 8").Select
Can someone say how to explicitly name shapes and groups, in code such
as below? (Actual samples would be most helpful)
Thanks...
Public Declare Function GetTickCount Lib "kernel32.dll" () As Long
Sub subTimer(iMilliseconds As Integer)
Dim iTickCount As Long
DoEvents
iTickCount = GetTickCount
Do While (GetTickCount - iTickCount) < iMilliseconds
Loop
DoEvents
End Sub
Sub testDraw1()
ActiveDocument.Shapes.AddShape(msoShapeOval, 98.5, 205.8, 58.4,
59.1). _
Select
Application.WindowState = wdWindowStateMaximize
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(0, 128, 0)
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 0)
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.Left = 98.6
Selection.ShapeRange.Top = 205.9
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Call subTimer(100)
Selection.ShapeRange.Left = InchesToPoints(0.12)
Selection.ShapeRange.Top = InchesToPoints(1.86)
Call subTimer(100)
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
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 16.3
Selection.ShapeRange.IncrementTop 1.4
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 12.95
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 15.6
Selection.ShapeRange.IncrementTop 2.05
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 14.3
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 33.25
Selection.ShapeRange.IncrementTop 6.8
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 29.2
Selection.ShapeRange.IncrementTop 3.4
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 29.2
Selection.ShapeRange.IncrementTop -1.4
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 45.5
Selection.ShapeRange.IncrementTop -4.05
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 38.05
Selection.ShapeRange.IncrementTop -6.1
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 46.9
Selection.ShapeRange.IncrementTop -16.3
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 31.2
Selection.ShapeRange.IncrementTop -33.3
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 34.65
Selection.ShapeRange.IncrementTop -50.95
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 14.25
Selection.ShapeRange.IncrementTop -32.6
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -53#
Selection.ShapeRange.IncrementTop -13.55
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -70.65
Selection.ShapeRange.IncrementTop -10.2
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -64.55
Selection.ShapeRange.IncrementTop 43.5
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -56.35
Selection.ShapeRange.IncrementTop 51.65
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -68.6
Selection.ShapeRange.IncrementTop 5.4
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -61.85
Selection.ShapeRange.IncrementTop -40.8
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -1.35
Selection.ShapeRange.IncrementTop -41.4
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 53.65
Selection.ShapeRange.IncrementTop -12.9
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 57.05
Selection.ShapeRange.IncrementTop 10.2
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 38.75
Selection.ShapeRange.IncrementTop 42.1
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 14.9
Selection.ShapeRange.IncrementTop 36#
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 2.05
Selection.ShapeRange.IncrementTop 48.95
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -20.35
Selection.ShapeRange.IncrementTop 57.7
Call subTimer(100)
Selection.ShapeRange.ScaleHeight 2.07, msoFalse,
msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 1.47, msoFalse,
msoScaleFromBottomRight
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -36.65
Selection.ShapeRange.IncrementTop -2.7
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -42.15
Selection.ShapeRange.IncrementTop -10.85
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -11.55
Selection.ShapeRange.IncrementTop -37.35
Call subTimer(100)
Selection.ShapeRange.ScaleWidth 1.21, msoFalse,
msoScaleFromBottomRight
Selection.ShapeRange.ScaleHeight 1.33, msoFalse,
msoScaleFromBottomRight
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 36#
Selection.ShapeRange.IncrementTop -35.3
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 34.65
Selection.ShapeRange.IncrementTop -17.7
Call subTimer(100)
Selection.ShapeRange.ScaleWidth 1.61, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.06, msoFalse,
msoScaleFromBottomRight
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 86.25
Selection.ShapeRange.IncrementTop 4.1
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 46.2
Selection.ShapeRange.IncrementTop -28.55
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 46.85
Selection.ShapeRange.IncrementTop -8.8
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 38.7
Selection.ShapeRange.IncrementTop 45.5
Call subTimer(100)
Selection.ShapeRange.ScaleWidth 1.26, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.5, msoFalse, msoScaleFromTopLeft
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -30.6
Selection.ShapeRange.IncrementTop 57.7
Call subTimer(100)
Selection.ShapeRange.ScaleWidth 1.23, msoFalse,
msoScaleFromBottomRight
Selection.ShapeRange.ScaleHeight 1.07, msoFalse,
msoScaleFromTopLeft
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -71.35
Selection.ShapeRange.IncrementTop 89#
Call subTimer(100)
Selection.ShapeRange.ScaleWidth 1.49, msoFalse,
msoScaleFromBottomRight
Selection.ShapeRange.ScaleHeight 1.13, msoFalse,
msoScaleFromBottomRight
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -31.9
Selection.ShapeRange.IncrementTop -111.4
Call subTimer(100)
Selection.ShapeRange.ScaleWidth 1.07, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.15, msoFalse,
msoScaleFromBottomRight
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 52.95
Selection.ShapeRange.IncrementTop -44.85
Call subTimer(100)
Selection.ShapeRange.ScaleHeight 1.13, msoFalse,
msoScaleFromTopLeft
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 57.7
Selection.ShapeRange.IncrementTop 104.6
Call subTimer(100)
Selection.ShapeRange.ScaleWidth 1.34, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.14, msoFalse,
msoScaleFromBottomRight
End Sub
Sub testDraw2()
ActiveDocument.Shapes.AddShape(msoShapeOval, 86.25, 166.4, 61.85,
65.2). _
Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(0, 0, 255)
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 0)
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.Left = 86.4
Selection.ShapeRange.Top = 166.3
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.Left = InchesToPoints(-0.05)
Selection.ShapeRange.Top = InchesToPoints(1.31)
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
ActiveDocument.Shapes.AddShape(msoShapeRectangle, 103.25, 235#,
29.9, _
61.85).Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(51, 102, 255)
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 0)
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.Left = 102.95
Selection.ShapeRange.Top = 234.7
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.Left = InchesToPoints(0.18)
Selection.ShapeRange.Top = InchesToPoints(2.26)
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
ActiveDocument.Shapes.AddLine(105.3, 298.85, 105.3, 349.15).Select
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 4.5
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 255)
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 = msoArrowheadNone
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.Left = 105.1
Selection.ShapeRange.Top = 298.8
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.Left = InchesToPoints(0.21)
Selection.ShapeRange.Top = InchesToPoints(3.15)
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
ActiveDocument.Shapes.AddLine(131.1, 299.55, 131.1, 349.15).Select
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 6#
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 255)
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 = msoArrowheadNone
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.Left = 131#
Selection.ShapeRange.Top = 299.5
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.Left = InchesToPoints(0.57)
Selection.ShapeRange.Top = InchesToPoints(3.16)
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
ActiveDocument.Shapes.AddLine(78.1, 237.05, 101.2, 254.7).Select
Selection.ShapeRange.Flip msoFlipHorizontal
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 4.5
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 255)
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 = msoArrowheadNone
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.Left = 77.75
Selection.ShapeRange.Top = 236.85
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.Left = InchesToPoints(-0.17)
Selection.ShapeRange.Top = InchesToPoints(2.29)
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
ActiveDocument.Shapes("Line 5").Select
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 4.5
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 255)
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 = msoArrowheadNone
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.Left = 131#
Selection.ShapeRange.Top = 299.5
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.Left = InchesToPoints(0.57)
Selection.ShapeRange.Top = InchesToPoints(3.16)
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
ActiveDocument.Shapes.AddLine(135.15, 236.4, 156.9, 258.1).Select
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 4.5
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 255)
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 = msoArrowheadNone
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.Left = 135.35
Selection.ShapeRange.Top = 236.15
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.Left = InchesToPoints(0.63)
Selection.ShapeRange.Top = InchesToPoints(2.28)
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
ActiveDocument.Shapes.Range(Array("Oval 2", "Rectangle 3", "Line
4", _
"Line 5" _
, "Line 6", "Line 7")).Select
Selection.ShapeRange.Group.Select
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 33.3
Selection.ShapeRange.IncrementTop -34.65
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 25.15
Selection.ShapeRange.IncrementTop -20.35
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 43.45
Selection.ShapeRange.IncrementTop -26.5
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 30.55
Selection.ShapeRange.IncrementTop -6.1
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 30.55
Selection.ShapeRange.IncrementTop 4.05
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 12.2
Selection.ShapeRange.IncrementTop 17.65
Selection.ShapeRange.ScaleWidth 1.16, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.13, msoFalse,
msoScaleFromTopLeft
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 29.9
Selection.ShapeRange.IncrementTop 25.1
Selection.ShapeRange.ScaleWidth 1.41, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.16, msoFalse,
msoScaleFromTopLeft
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 20.35
Selection.ShapeRange.IncrementTop 36#
Selection.ShapeRange.ScaleWidth 1.08, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.1, msoFalse, msoScaleFromTopLeft
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 4.75
Selection.ShapeRange.IncrementTop 27.85
Selection.ShapeRange.IncrementRotation 5.24
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft -19.05
Selection.ShapeRange.IncrementTop 26.5
Selection.ShapeRange.IncrementRotation 9.28
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft -48.2
Selection.ShapeRange.IncrementTop 8.8
Selection.ShapeRange.IncrementRotation 8.64
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft -31.25
Selection.ShapeRange.IncrementTop -9.55
Selection.ShapeRange.IncrementRotation 7.08
Selection.ShapeRange.ScaleWidth 0.84, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 0.91, msoFalse,
msoScaleFromTopLeft
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft -36#
Selection.ShapeRange.IncrementTop -42.8
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementRotation 17.49
ActiveDocument.Shapes("Group 8").Select
ActiveDocument.Shapes("Group 8").Select
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.ScaleHeight 0.89, msoFalse,
msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 0.66, msoFalse, msoScaleFromTopLeft
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 23.1
Selection.ShapeRange.IncrementTop -38#
Selection.ShapeRange.IncrementRotation 18.79
Selection.ShapeRange.ScaleHeight 0.83, msoFalse,
msoScaleFromTopLeft
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 10.2
Selection.ShapeRange.IncrementTop 19#
Selection.ShapeRange.IncrementRotation 9.53
Selection.ShapeRange.ScaleHeight 0.77, msoFalse,
msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 0.68, msoFalse, msoScaleFromTopLeft
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 17#
Selection.ShapeRange.IncrementTop 29.9
Selection.ShapeRange.IncrementRotation 19.14
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft -6.75
Selection.ShapeRange.IncrementTop 19.05
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.ScaleHeight 0.76, msoFalse,
msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 0.67, msoFalse,
msoScaleFromBottomRight
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft -37.35
Selection.ShapeRange.IncrementTop 20.35
Selection.ShapeRange.IncrementRotation 37.2
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.ScaleHeight 0.87, msoFalse,
msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 0.68, msoFalse,
msoScaleFromBottomRight
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft -22.4
Selection.ShapeRange.IncrementTop -15.6
Selection.ShapeRange.ScaleHeight 0.79, msoFalse,
msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 1.36, msoFalse,
msoScaleFromBottomRight
Selection.ShapeRange.IncrementRotation 13.49
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 11.55
Selection.ShapeRange.IncrementTop -11.55
Selection.ShapeRange.IncrementRotation 21.12
Selection.ShapeRange.ScaleWidth 0.67, msoFalse,
msoScaleFromBottomRight
Selection.ShapeRange.ScaleHeight 0.61, msoFalse,
msoScaleFromTopLeft
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft -7.5
Selection.ShapeRange.IncrementTop -4.75
Selection.ShapeRange.IncrementRotation 16.34
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.ScaleWidth 0.72, msoFalse,
msoScaleFromBottomRight
Selection.ShapeRange.ScaleHeight 0.79, msoFalse,
msoScaleFromTopLeft
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft -5.45
Selection.ShapeRange.IncrementTop -7.45
Selection.ShapeRange.IncrementRotation 18.06
ActiveDocument.Shapes("Group 8").Select
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.ScaleWidth 0.71, msoFalse,
msoScaleFromBottomRight
Selection.ShapeRange.ScaleHeight 0.8, msoFalse, msoScaleFromTopLeft
ActiveDocument.Shapes("Group 8").Select
End Sub
and run macro testDraw1 - it should work
a green blob dances around the screen
But try running the macro testDraw2
and you will see problems with lines like
ActiveDocument.Shapes("Line 5").Select
it seems when the line shape was created,
Word auto-enumerated some internal counter of that particular shape,
and auto-named the shape using that counter (ie "Line 5")
and if you try to play the macro later
that counter might be reset, and thus the shape name would be
different,
ie, what was "Line 5" when the macro was created, might be
"Line 2" for someone else playing back the macro.
and the macro won't work for playback
The answer would be to edit the macro to explicitly name the shape in a
line like
ActiveDocument.Shapes.AddShape(msoShapeOval, 86.25, 166.4, 61.85,
65.2). _
Select
This also is the case with group objects, for instance "myGroup"
ActiveDocument.Shapes.Range(Array("Oval 2", "Rectangle 3", "Line
4", _
"Line 5" _
, "Line 6", "Line 7")).Select
Selection.ShapeRange.Group.Select
so that later you can reference it with
ActiveDocument.Shapes("myGroup").Select
instead of some default name like
ActiveDocument.Shapes("Group 8").Select
Can someone say how to explicitly name shapes and groups, in code such
as below? (Actual samples would be most helpful)
Thanks...
Public Declare Function GetTickCount Lib "kernel32.dll" () As Long
Sub subTimer(iMilliseconds As Integer)
Dim iTickCount As Long
DoEvents
iTickCount = GetTickCount
Do While (GetTickCount - iTickCount) < iMilliseconds
Loop
DoEvents
End Sub
Sub testDraw1()
ActiveDocument.Shapes.AddShape(msoShapeOval, 98.5, 205.8, 58.4,
59.1). _
Select
Application.WindowState = wdWindowStateMaximize
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(0, 128, 0)
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 0)
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.Left = 98.6
Selection.ShapeRange.Top = 205.9
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Call subTimer(100)
Selection.ShapeRange.Left = InchesToPoints(0.12)
Selection.ShapeRange.Top = InchesToPoints(1.86)
Call subTimer(100)
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
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 16.3
Selection.ShapeRange.IncrementTop 1.4
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 12.95
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 15.6
Selection.ShapeRange.IncrementTop 2.05
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 14.3
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 33.25
Selection.ShapeRange.IncrementTop 6.8
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 29.2
Selection.ShapeRange.IncrementTop 3.4
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 29.2
Selection.ShapeRange.IncrementTop -1.4
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 45.5
Selection.ShapeRange.IncrementTop -4.05
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 38.05
Selection.ShapeRange.IncrementTop -6.1
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 46.9
Selection.ShapeRange.IncrementTop -16.3
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 31.2
Selection.ShapeRange.IncrementTop -33.3
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 34.65
Selection.ShapeRange.IncrementTop -50.95
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 14.25
Selection.ShapeRange.IncrementTop -32.6
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -53#
Selection.ShapeRange.IncrementTop -13.55
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -70.65
Selection.ShapeRange.IncrementTop -10.2
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -64.55
Selection.ShapeRange.IncrementTop 43.5
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -56.35
Selection.ShapeRange.IncrementTop 51.65
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -68.6
Selection.ShapeRange.IncrementTop 5.4
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -61.85
Selection.ShapeRange.IncrementTop -40.8
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -1.35
Selection.ShapeRange.IncrementTop -41.4
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 53.65
Selection.ShapeRange.IncrementTop -12.9
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 57.05
Selection.ShapeRange.IncrementTop 10.2
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 38.75
Selection.ShapeRange.IncrementTop 42.1
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 14.9
Selection.ShapeRange.IncrementTop 36#
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 2.05
Selection.ShapeRange.IncrementTop 48.95
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -20.35
Selection.ShapeRange.IncrementTop 57.7
Call subTimer(100)
Selection.ShapeRange.ScaleHeight 2.07, msoFalse,
msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 1.47, msoFalse,
msoScaleFromBottomRight
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -36.65
Selection.ShapeRange.IncrementTop -2.7
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -42.15
Selection.ShapeRange.IncrementTop -10.85
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -11.55
Selection.ShapeRange.IncrementTop -37.35
Call subTimer(100)
Selection.ShapeRange.ScaleWidth 1.21, msoFalse,
msoScaleFromBottomRight
Selection.ShapeRange.ScaleHeight 1.33, msoFalse,
msoScaleFromBottomRight
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 36#
Selection.ShapeRange.IncrementTop -35.3
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 34.65
Selection.ShapeRange.IncrementTop -17.7
Call subTimer(100)
Selection.ShapeRange.ScaleWidth 1.61, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.06, msoFalse,
msoScaleFromBottomRight
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 86.25
Selection.ShapeRange.IncrementTop 4.1
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 46.2
Selection.ShapeRange.IncrementTop -28.55
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 46.85
Selection.ShapeRange.IncrementTop -8.8
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 38.7
Selection.ShapeRange.IncrementTop 45.5
Call subTimer(100)
Selection.ShapeRange.ScaleWidth 1.26, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.5, msoFalse, msoScaleFromTopLeft
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -30.6
Selection.ShapeRange.IncrementTop 57.7
Call subTimer(100)
Selection.ShapeRange.ScaleWidth 1.23, msoFalse,
msoScaleFromBottomRight
Selection.ShapeRange.ScaleHeight 1.07, msoFalse,
msoScaleFromTopLeft
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -71.35
Selection.ShapeRange.IncrementTop 89#
Call subTimer(100)
Selection.ShapeRange.ScaleWidth 1.49, msoFalse,
msoScaleFromBottomRight
Selection.ShapeRange.ScaleHeight 1.13, msoFalse,
msoScaleFromBottomRight
Call subTimer(100)
Selection.ShapeRange.IncrementLeft -31.9
Selection.ShapeRange.IncrementTop -111.4
Call subTimer(100)
Selection.ShapeRange.ScaleWidth 1.07, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.15, msoFalse,
msoScaleFromBottomRight
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 52.95
Selection.ShapeRange.IncrementTop -44.85
Call subTimer(100)
Selection.ShapeRange.ScaleHeight 1.13, msoFalse,
msoScaleFromTopLeft
Call subTimer(100)
Selection.ShapeRange.IncrementLeft 57.7
Selection.ShapeRange.IncrementTop 104.6
Call subTimer(100)
Selection.ShapeRange.ScaleWidth 1.34, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.14, msoFalse,
msoScaleFromBottomRight
End Sub
Sub testDraw2()
ActiveDocument.Shapes.AddShape(msoShapeOval, 86.25, 166.4, 61.85,
65.2). _
Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(0, 0, 255)
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 0)
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.Left = 86.4
Selection.ShapeRange.Top = 166.3
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.Left = InchesToPoints(-0.05)
Selection.ShapeRange.Top = InchesToPoints(1.31)
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
ActiveDocument.Shapes.AddShape(msoShapeRectangle, 103.25, 235#,
29.9, _
61.85).Select
Selection.ShapeRange.Fill.Visible = msoTrue
Selection.ShapeRange.Fill.Solid
Selection.ShapeRange.Fill.ForeColor.RGB = RGB(51, 102, 255)
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 0.75
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 0)
Selection.ShapeRange.Line.BackColor.RGB = RGB(255, 255, 255)
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.Left = 102.95
Selection.ShapeRange.Top = 234.7
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.Left = InchesToPoints(0.18)
Selection.ShapeRange.Top = InchesToPoints(2.26)
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
ActiveDocument.Shapes.AddLine(105.3, 298.85, 105.3, 349.15).Select
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 4.5
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 255)
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 = msoArrowheadNone
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.Left = 105.1
Selection.ShapeRange.Top = 298.8
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.Left = InchesToPoints(0.21)
Selection.ShapeRange.Top = InchesToPoints(3.15)
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
ActiveDocument.Shapes.AddLine(131.1, 299.55, 131.1, 349.15).Select
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 6#
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 255)
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 = msoArrowheadNone
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.Left = 131#
Selection.ShapeRange.Top = 299.5
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.Left = InchesToPoints(0.57)
Selection.ShapeRange.Top = InchesToPoints(3.16)
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
ActiveDocument.Shapes.AddLine(78.1, 237.05, 101.2, 254.7).Select
Selection.ShapeRange.Flip msoFlipHorizontal
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 4.5
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 255)
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 = msoArrowheadNone
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.Left = 77.75
Selection.ShapeRange.Top = 236.85
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.Left = InchesToPoints(-0.17)
Selection.ShapeRange.Top = InchesToPoints(2.29)
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
ActiveDocument.Shapes("Line 5").Select
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 4.5
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 255)
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 = msoArrowheadNone
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.Left = 131#
Selection.ShapeRange.Top = 299.5
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.Left = InchesToPoints(0.57)
Selection.ShapeRange.Top = InchesToPoints(3.16)
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
ActiveDocument.Shapes.AddLine(135.15, 236.4, 156.9, 258.1).Select
Selection.ShapeRange.Fill.Transparency = 0#
Selection.ShapeRange.Line.Weight = 4.5
Selection.ShapeRange.Line.DashStyle = msoLineSolid
Selection.ShapeRange.Line.Style = msoLineSingle
Selection.ShapeRange.Line.Transparency = 0#
Selection.ShapeRange.Line.Visible = msoTrue
Selection.ShapeRange.Line.ForeColor.RGB = RGB(0, 0, 255)
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 = msoArrowheadNone
Selection.ShapeRange.LockAspectRatio = msoFalse
Selection.ShapeRange.Rotation = 0#
Selection.ShapeRange.Left = 135.35
Selection.ShapeRange.Top = 236.15
Selection.ShapeRange.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
Selection.ShapeRange.RelativeVerticalPosition = _
wdRelativeVerticalPositionParagraph
Selection.ShapeRange.Left = InchesToPoints(0.63)
Selection.ShapeRange.Top = InchesToPoints(2.28)
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
ActiveDocument.Shapes.Range(Array("Oval 2", "Rectangle 3", "Line
4", _
"Line 5" _
, "Line 6", "Line 7")).Select
Selection.ShapeRange.Group.Select
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 33.3
Selection.ShapeRange.IncrementTop -34.65
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 25.15
Selection.ShapeRange.IncrementTop -20.35
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 43.45
Selection.ShapeRange.IncrementTop -26.5
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 30.55
Selection.ShapeRange.IncrementTop -6.1
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 30.55
Selection.ShapeRange.IncrementTop 4.05
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 12.2
Selection.ShapeRange.IncrementTop 17.65
Selection.ShapeRange.ScaleWidth 1.16, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.13, msoFalse,
msoScaleFromTopLeft
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 29.9
Selection.ShapeRange.IncrementTop 25.1
Selection.ShapeRange.ScaleWidth 1.41, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.16, msoFalse,
msoScaleFromTopLeft
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 20.35
Selection.ShapeRange.IncrementTop 36#
Selection.ShapeRange.ScaleWidth 1.08, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 1.1, msoFalse, msoScaleFromTopLeft
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 4.75
Selection.ShapeRange.IncrementTop 27.85
Selection.ShapeRange.IncrementRotation 5.24
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft -19.05
Selection.ShapeRange.IncrementTop 26.5
Selection.ShapeRange.IncrementRotation 9.28
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft -48.2
Selection.ShapeRange.IncrementTop 8.8
Selection.ShapeRange.IncrementRotation 8.64
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft -31.25
Selection.ShapeRange.IncrementTop -9.55
Selection.ShapeRange.IncrementRotation 7.08
Selection.ShapeRange.ScaleWidth 0.84, msoFalse, msoScaleFromTopLeft
Selection.ShapeRange.ScaleHeight 0.91, msoFalse,
msoScaleFromTopLeft
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft -36#
Selection.ShapeRange.IncrementTop -42.8
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementRotation 17.49
ActiveDocument.Shapes("Group 8").Select
ActiveDocument.Shapes("Group 8").Select
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.ScaleHeight 0.89, msoFalse,
msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 0.66, msoFalse, msoScaleFromTopLeft
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 23.1
Selection.ShapeRange.IncrementTop -38#
Selection.ShapeRange.IncrementRotation 18.79
Selection.ShapeRange.ScaleHeight 0.83, msoFalse,
msoScaleFromTopLeft
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 10.2
Selection.ShapeRange.IncrementTop 19#
Selection.ShapeRange.IncrementRotation 9.53
Selection.ShapeRange.ScaleHeight 0.77, msoFalse,
msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 0.68, msoFalse, msoScaleFromTopLeft
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 17#
Selection.ShapeRange.IncrementTop 29.9
Selection.ShapeRange.IncrementRotation 19.14
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft -6.75
Selection.ShapeRange.IncrementTop 19.05
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.ScaleHeight 0.76, msoFalse,
msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 0.67, msoFalse,
msoScaleFromBottomRight
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft -37.35
Selection.ShapeRange.IncrementTop 20.35
Selection.ShapeRange.IncrementRotation 37.2
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.ScaleHeight 0.87, msoFalse,
msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 0.68, msoFalse,
msoScaleFromBottomRight
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft -22.4
Selection.ShapeRange.IncrementTop -15.6
Selection.ShapeRange.ScaleHeight 0.79, msoFalse,
msoScaleFromTopLeft
Selection.ShapeRange.ScaleWidth 1.36, msoFalse,
msoScaleFromBottomRight
Selection.ShapeRange.IncrementRotation 13.49
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft 11.55
Selection.ShapeRange.IncrementTop -11.55
Selection.ShapeRange.IncrementRotation 21.12
Selection.ShapeRange.ScaleWidth 0.67, msoFalse,
msoScaleFromBottomRight
Selection.ShapeRange.ScaleHeight 0.61, msoFalse,
msoScaleFromTopLeft
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft -7.5
Selection.ShapeRange.IncrementTop -4.75
Selection.ShapeRange.IncrementRotation 16.34
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.ScaleWidth 0.72, msoFalse,
msoScaleFromBottomRight
Selection.ShapeRange.ScaleHeight 0.79, msoFalse,
msoScaleFromTopLeft
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.IncrementLeft -5.45
Selection.ShapeRange.IncrementTop -7.45
Selection.ShapeRange.IncrementRotation 18.06
ActiveDocument.Shapes("Group 8").Select
ActiveDocument.Shapes("Group 8").Select
Selection.ShapeRange.ScaleWidth 0.71, msoFalse,
msoScaleFromBottomRight
Selection.ShapeRange.ScaleHeight 0.8, msoFalse, msoScaleFromTopLeft
ActiveDocument.Shapes("Group 8").Select
End Sub