E
Elliot
Hi
I need to keep a shape object at the very top of a page just after the
header and before the first line of a table.
I'm not able to anchor the shape so that it remains in its initial
position. When I turn on the anchor display and select the object, the
anchor is shown as locked but it always remains at the bottom of the
newly inserted table instead of just before it. When the table spills
onto the next page my image follows it.
I've tried inserting a paragraph before the table, this didn't help.
I'm using the following code:
Set rngVersal = Selection.Range
(FileName:="C:\ELLIOT\Versals\Wetstein\" & strLetter & ".gif", _
linktofile:=False, savewithdocument:=True, _
Anchor:=rngVersal)
With shpVersal
.LockAnchor = True
.Width = 77
.Height = 83
.WrapFormat.Type = wdWrapSquare
.WrapFormat.AllowOverlap = False
.WrapFormat.Side = wdWrapBoth
.WrapFormat.DistanceTop = 50
.WrapFormat.DistanceBottom = 32
.WrapFormat.DistanceLeft = 50
.WrapFormat.DistanceRight = 50
.LockAspectRatio = msoTrue
.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
.Left = wdShapeCenter
.RelativeVerticalPosition = _
wdRelativeVerticalPositionPage
.Top = 14
End With
I can unlock the anchor and move it to the correct position in Word,
but I can't do this programmatically.
Thanks for any help.
Elliot
I need to keep a shape object at the very top of a page just after the
header and before the first line of a table.
I'm not able to anchor the shape so that it remains in its initial
position. When I turn on the anchor display and select the object, the
anchor is shown as locked but it always remains at the bottom of the
newly inserted table instead of just before it. When the table spills
onto the next page my image follows it.
I've tried inserting a paragraph before the table, this didn't help.
I'm using the following code:
Set rngVersal = Selection.Range
(FileName:="C:\ELLIOT\Versals\Wetstein\" & strLetter & ".gif", _
linktofile:=False, savewithdocument:=True, _
Anchor:=rngVersal)
With shpVersal
.LockAnchor = True
.Width = 77
.Height = 83
.WrapFormat.Type = wdWrapSquare
.WrapFormat.AllowOverlap = False
.WrapFormat.Side = wdWrapBoth
.WrapFormat.DistanceTop = 50
.WrapFormat.DistanceBottom = 32
.WrapFormat.DistanceLeft = 50
.WrapFormat.DistanceRight = 50
.LockAspectRatio = msoTrue
.RelativeHorizontalPosition = _
wdRelativeHorizontalPositionColumn
.Left = wdShapeCenter
.RelativeVerticalPosition = _
wdRelativeVerticalPositionPage
.Top = 14
End With
I can unlock the anchor and move it to the correct position in Word,
but I can't do this programmatically.
Thanks for any help.
Elliot