05.11.2013, 17:58
Hallo Norre,
das fällt nicht lästig.
Tausche die SUB gegen die Folgende aus:
Erläuterung:
Die letzte For-Schleife läuft jetzt rückwärts.
Gruß
Koter
das fällt nicht lästig.
Tausche die SUB gegen die Folgende aus:
Code:
Sub TextOrdBlattrandOben()
Dim TextPosStID()
Dim s As Shape
i = 0
For Each s In ActivePage.Shapes
If s.Type = cdrTextShape Then
i = i + 1
End If
Next
ReDim TextPosStID(0 To i - 1, 0 To 1)
i = 0
TextPosStID(0, 0) = "0.258"
For Each s In ActivePage.Shapes
If s.Type = cdrTextShape Then
TextPosStID(i, 0) = s.PositionY
TextPosStID(i, 1) = s.StaticID
i = i + 1
End If
Next
Call QuickSortMultiDim(TextPosStID)
Debug.Print UBound(TextPosStID)
ActiveDocument.BeginCommandGroup "Text von Blattpos. Z-Anordnen"
For i = UBound(TextPosStID) To 0 Step -1
Set s = ActivePage.FindShape(StaticID:=TextPosStID(i, 1))
s.OrderToFront
Next i
ActiveDocument.EndCommandGroup
End Sub
Erläuterung:
Die letzte For-Schleife läuft jetzt rückwärts.
Gruß
Koter