E
eselick
Hi
Here's my second problem.
The following code shows how I would like to vertically position my
image.
Set shpVersal = ActiveDocument.Shapes.AddPicture _
(FileName:="C:\ELLIOT\Versals\Wetstein\" & strLetter & ".gif", _
linktofile:=False, savewithdocument:=True, _
Anchor:=rngVersal)
With shpVersal
.WrapFormat.Type = wdWrapSquare
.WrapFormat.AllowOverlap = True
.WrapFormat.Side = wdWrapBoth
.WrapFormat.DistanceTop = 50
.WrapFormat.DistanceBottom = 20
.WrapFormat.DistanceLeft = 50
.WrapFormat.DistanceRight = 50
.LockAspectRatio = msoTrue
.LockAnchor = True
.Width = 77
.Height = 83
.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
.Left = wdShapeCenter
.RelativeVerticalPosition = _
wdRelativeVerticalPositionPage
.Top = 5.6
If .Top < 0 Then ' Debug code which never executes
Stop
End If
End With
The image inserts and when I step through the macro the top position is
correct, (the same as in the code). However when I let the macro run
normally I'm getting negative numbers for the top or vertical position.
Does anyone have any idea why this is happening?
My page layout is "Book Fold". The error did not occurr in the last
version of my macro and something must have changed in the environment
since when I restore the older version I'm still having the same
problem
Thanks a bunch,
Elliot
Here's my second problem.
The following code shows how I would like to vertically position my
image.
Set shpVersal = ActiveDocument.Shapes.AddPicture _
(FileName:="C:\ELLIOT\Versals\Wetstein\" & strLetter & ".gif", _
linktofile:=False, savewithdocument:=True, _
Anchor:=rngVersal)
With shpVersal
.WrapFormat.Type = wdWrapSquare
.WrapFormat.AllowOverlap = True
.WrapFormat.Side = wdWrapBoth
.WrapFormat.DistanceTop = 50
.WrapFormat.DistanceBottom = 20
.WrapFormat.DistanceLeft = 50
.WrapFormat.DistanceRight = 50
.LockAspectRatio = msoTrue
.LockAnchor = True
.Width = 77
.Height = 83
.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
.Left = wdShapeCenter
.RelativeVerticalPosition = _
wdRelativeVerticalPositionPage
.Top = 5.6
If .Top < 0 Then ' Debug code which never executes
Stop
End If
End With
The image inserts and when I step through the macro the top position is
correct, (the same as in the code). However when I let the macro run
normally I'm getting negative numbers for the top or vertical position.
Does anyone have any idea why this is happening?
My page layout is "Book Fold". The error did not occurr in the last
version of my macro and something must have changed in the environment
since when I restore the older version I'm still having the same
problem
Thanks a bunch,
Elliot