Herbers Excel-Forum - das Archiv

Falz- und Lochmarken

Bild

Betrifft: Falz- und Lochmarken
von: patrick
Geschrieben am: 13.12.2003 22:14:47
Hallo ! Ich habe folgendes Problem:
Ich brauch ein Makro das mir in einer Exceltabelle Falz- bzw. Lochmarken einfügt ! Gibt es sowas überhaupt für Excel ..? Habe bisher nur solche Makros für Word gefunden.

Vielen Dank

Gruß Patrick

Bild

Betrifft: AW: Falz- und Lochmarken
von: ManuelaM
Geschrieben am: 13.12.2003 22:20:31
Hallo,

füg den Code in ein Standardmodul ein. Wenn du das in allen Mappen
verwenden willst, in die Arbeitsmappe PERSONL.XLS und dann am besten
ein Symbol in die Menüleiste und dem das Makro zuordnen:

Option Explicit
Const SC As Long = 0
Const LW As Double = 1.43


Sub Falzmarken()
Dim t As Double, s As Byte, tm As Double, Sh As Shape
For Each Sh In ActiveSheet.Shapes
With Sh
If .Type = 9 And .Line.Weight = LW And _
.Line.ForeColor.SchemeColor = SC Then
.Delete
End If
End With
Next
tm = ActiveSheet.PageSetup.TopMargin
t = 281 - tm
For s = 1 To 2
Set Sh = ActiveSheet.Shapes.AddLine(0, t, 24, t)
With Sh
.Line.Weight = LW
.Line.DashStyle = 1
.Line.Style = 1
.Line.ForeColor.SchemeColor = SC
.Placement = 3
End With
t = t + 281
Next
End Sub



Gruß Manu
Bild

Betrifft: AW: Falz- und Lochmarken
von: Patrick
Geschrieben am: 14.12.2003 12:28:55
Vielen Dank ! Das werde ich gleich mal probieren :)

Gruß Patrick
Bild