TPE

http://bayanbox.ir/view/263405954590585756/2mobile.png

Tavvafi@gmail.com


≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡

Sub AddNamedShape()
' Run this once on each template or presentation to create a
' text shape on masters that we can find later with the next macro

Dim x As Long
Dim oSh As Shape

With ActivePresentation

    ' On each slidemaster in the presentation:
    For x = 1 To .Designs.Count
        ' Create a textbox at 10 points from left, 
        ' 100 points from bottom of slide
        ' Make it 25 points high, 300 points wide
        ' Change any of these numbers at will
        Set oSh = _
           .Designs(1).SlideMaster.Shapes.AddTextbox(msoTextOrientationHorizontal, _
            10, _
            .PageSetup.SlideHeight - 100, _
            300, _
            25)

        ' Give it a name so we can find it later
        oSh.Name = "FullPath"

        ' Add some formatting and dummy text
        With oSh.TextFrame.TextRange
            .Font.Name = "Arial"
            .Font.Size = 12
            .Text = "Full name of file will appear here"
        End With

    Next
End With

End Sub

Sub AddPath()
' Run this to add the full name of the presentation to the
' slide masters

Dim x As Long

With ActivePresentation
    On Error Resume Next ' in case the shape isn't there

    For x = 1 To .Designs.Count
        .Designs(x).SlideMaster.Shapes("FullPath").TextFrame.TextRange.Text _
         = .FullName
    Next

End With

End Sub