18.02.2017, 22:33
Hallo Destiny,
Der ReferencePoint wurde geändert und der Code zum Zentrieren und für den Umbruch entfernt.
Hoffentlich habe ich es richtig verstanden, wenn nicht, bitte noch einmal melden.
Gruß
Koter
destiny schrieb:Wenn der Text an der Stelle stehen bleiben soll - also die Y-Achse gleich bleibt,
was müsste ich im Code anpassen? (anstatt Seite.CenterY nehme ich an)
Code:
Sub GrafiktextVerkleinern()
Dim Seite As Page
Dim Grafiktext As ShapeRange
Dim Text As Shape
Dim Breite As Double, cx As Double, cy As Double
Breite = 80 '(%)
ActiveDocument.Unit = cdrMillimeter
ActiveDocument.ReferencePoint = cdrBottomLeft
ActiveDocument.BeginCommandGroup "Text verkleinern"
Optimization = True
For Each Seite In ActiveDocument.Pages
Set Grafiktext = Seite.Shapes.FindShapes(Query:="@type='text:artistic'")
If Not Grafiktext Is Nothing Then
For Each Text In Grafiktext
If Text.SizeWidth > Seite.SizeWidth / 100 * Breite Then
Text.SizeWidth = Seite.SizeWidth / 100 * Breite
End If
Next
End If
Next
Optimization = False
ActiveDocument.EndCommandGroup
ActiveWindow.Refresh
End Sub
Hoffentlich habe ich es richtig verstanden, wenn nicht, bitte noch einmal melden.
Gruß
Koter