Ok - I am now able to reproduce this bug:
1 create a Single A4 page blank pub
2 insert an empty text box 24.7cm(h) by 16 cm(w) centred on the page (B1)
3 insert text box 15h x 13w (B2)
4 make B2 inline and place inside B1.
5 type text "This is several words of some demonstration text for Box 2"
into B2, set to 24 point
6 insert an empty text box 7h x 11w (B3)
7 make B3 inline and place inside B2 at end of the text
8 type text "This is several words of some demonstration text for Box 3"
into B3, set to 24 point
9 insert an empty picture frame 5 x 5 (P1)
10 make inline, place inside B3 before the first word
11 make P1 right aligned and set fill colour to grey
[11A Note here the other bug - drag the bottom edge of box B3 up so it half
obscures P1. the overflow indicator is not set, nor would you find it set in
code]
12 open the VB editor and insert the following code
Sub testboxtop()
Dim loThisShape(3) As Publisher.Shape
Dim loDupedShape As Publisher.Shape
With Pages(1)
Set loThisShape(1) = .Shapes(1)
With loThisShape(1)
.Name = "B1"
'.Select
Set loThisShape(2) = .TextFrame.TextRange.InlineShapes(1)
With loThisShape(2)
.Name = "B2"
'.Select
Set loThisShape(3) = .TextFrame.TextRange.InlineShapes(1)
.Height = .Height / 2
With loThisShape(3)
.Name = "B3"
.TextFrame.TextRange.InlineShapes(1).Name = "P1"
Set loDupedShape = .Duplicate
'loDupedShape.Select
.Delete
End With
With loDupedShape
'.Select
Debug.Print "after duplication before resizing B2"
Debug.Print "REF0: box B3 position", .GetTop(pbUnitCM),
..GetHeight(pbUnitCM), .GetLeft(pbUnitCM), .GetWidth(pbUnitCM)
With .TextFrame.TextRange.InlineShapes(1)
'.Select
Debug.Print "REF1: shape P1 position",
..GetTop(pbUnitCM), .GetHeight(pbUnitCM), .GetLeft(pbUnitCM),
..GetWidth(pbUnitCM)
End With
End With
.Height = .Height * 2
With loDupedShape
'.Select
Debug.Print "after duplication after resizing B2 up"
Debug.Print "REF2: box B3 position", .GetTop(pbUnitCM),
..GetHeight(pbUnitCM), .GetLeft(pbUnitCM), .GetWidth(pbUnitCM)
With .TextFrame.TextRange.InlineShapes(1)
'.Select
Debug.Print "REF3: shape P1 position",
..GetTop(pbUnitCM), .GetHeight(pbUnitCM), .GetLeft(pbUnitCM),
..GetWidth(pbUnitCM)
End With
End With
.Height = .Height / 2
With loDupedShape
'.Select
Debug.Print "after duplication after resizing B2 back down -
should be same as REF0,1"
Debug.Print "REF4: box B3 position ", .GetTop(pbUnitCM),
..GetHeight(pbUnitCM), .GetLeft(pbUnitCM), .GetWidth(pbUnitCM)
With .TextFrame.TextRange.InlineShapes(1)
'.Select
Debug.Print "REF5: shape P1 position ",
..GetTop(pbUnitCM), .GetHeight(pbUnitCM), .GetLeft(pbUnitCM),
..GetWidth(pbUnitCM)
End With
End With
.Height = .Height * 2
With loDupedShape
'.Select
Debug.Print "after duplication after resizing B2 back up
again - should be same as REF2,3"
Debug.Print "REF6: B3 position ", .GetTop(pbUnitCM),
..GetHeight(pbUnitCM), .GetLeft(pbUnitCM), .GetWidth(pbUnitCM)
With .TextFrame.TextRange.InlineShapes(1)
'.Select
Debug.Print "REF7: shape P1 position ",
..GetTop(pbUnitCM), .GetHeight(pbUnitCM), .GetLeft(pbUnitCM),
..GetWidth(pbUnitCM)
End With
End With
End With
End With
End With
End Sub
13 open the immediate window to view the debug output
14 save the publication to allow rework this at leisure!
15 adjust windows to see both the code and the publication
16 run the code and view the debug output
Results
Note the spurious image of the duplicated text box (B3) that remains half
into the scratch area.
The Top and Left positions of B3 immediately after it is duplicated as in
the immediate window under REF0 are wrong. Not only are they wrong but are
totally inconsistent with the position and left of shape P1 as in REF1. All
these should be the same as those found in REFs 2 and 3.
Note also how the shape P1 positions do remain correct despite the B£
positions being spasmodically wrong.
It is not enough to say "resize the outer box first..." because what I am
trying to do is overcome the bug noted in point 11A and to do that I need to
know the true bottom extent of B2...
What do you think I should do next to make sure MS is aware of these bugs?
William Hite