26.04.2025, 21:43
Hallo Peter,
Deine Aufzählung ist ja schon fast ein Makro!
Ab Punkt 2 in VBA übersetzt:
Punkt 4 und 5 habe ich weggelassen. Das Ergebnis ist also eine Gruppe.
Vielleicht nützt es Dir ja.
Gruß
Koter
Deine Aufzählung ist ja schon fast ein Makro!
Ab Punkt 2 in VBA übersetzt:
Code:
Sub MetaEAN()
Dim BCode As Shape
Dim Schwarz As New Color
Dim x As Double, y As Double
' Farbe anlegen
Schwarz.CMYKAssign 0, 0, 0, 100
' 2. Barcode ausschneiden
' (vorher die Position merken)
x = ActiveSelectionRange.PositionX
y = ActiveSelectionRange.PositionY
ActiveSelectionRange.Cut
'3. Barcode EINFÜGEN (als Metafile)
ActiveLayer.PasteSpecial "Metafile"
Set BCode = ActiveShape
' auf die Position des alten schieben
BCode.PositionX = x
BCode.PositionY = y
'6. Die Gewünschte Farbe geben (im Fall 100% schwarz: C:0 M:0Y:0 K:100)
BCode.Shapes.AllExcluding(BCode.Shapes.Count).ApplyUniformFill Schwarz
End Sub
Punkt 4 und 5 habe ich weggelassen. Das Ergebnis ist also eine Gruppe.
Vielleicht nützt es Dir ja.
Gruß
Koter