Hier nochmal der Code richtig angezeigt... hab ich vorher nicht gesehen, sorry.
Sub Laufwerkspfad_einfügen() 'InsertPath
Dim PathAndName As String
'Pfad und Dateiname ausgeben
PathAndName = ActivePresentation.Path & "\" & _
ActivePresentation.Name
'Anordnung der Textbox auf der Seite
'1.Zahl: links vom Rand, 2.Zahl: Höhe von oben, 3.Zahl: Breite der Textbox, 4.Zahl: Höhe der Textbox
Set myDocument = ActivePresentation.Slides.Range '(1)
With myDocument.Shapes _
.AddShape(msoShapeRectangle, 0, 520, 960, 20).TextFrame
'Transparenz der Textbox: 1 = transparent, 0 = nicht transparent, 0.5 = halb transparent
.Parent.Line.Visible = msoFalse
.Parent.Fill.Transparency = 1
'Inhalt der Textbox
.TextRange.Text = PathAndName
'Schriftname
.TextRange.Font.Name = "Arial"
'Schriftgröße
.TextRange.Font.Size = 10
'Textfarbe (0, 0, 0) = schwarz, (255, 255, 255) = weiß
.TextRange.Font.Color = RGB(0, 0, 0)
'Abstand des Textes vom Rand der Textbox
.MarginBottom = 10
.MarginLeft = 10
.MarginRight = 10
.MarginTop = 5
End With
End Sub
|