Hallo zusammen,
ich hoffe, ihr könnt mir helfen. Leider kenn ich mich nicht gut genug mit VBA aus.
Was möchte ich machen?
Ich möchte, auf ALLEN Slides meiner PowerPoint mit VBA (und Makro) den Pfad und den Dateinamen am unteren Ende der Präsentation anzeigen.
Was habe ich schon?
Das klappt schon, allerdings wird es nur auf der allerersten Seite ausgegeben.
Ich möchte, dass es auf jeden Seite angezeigt wird.
Was muss ich an meinem Code verändern?
CODE:
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
Danke für Eure Hilfe!!!
LG
Stefan
|