I've done some searching for PowerPoint help with the BeforeSave event (and in the vba help) but can't wrap my mind around it. I want to trigger my TEST macro below every time the user saves the file. Any ideas?
Here's my code:
[vba]
Sub test()
With ActivePresentation.Slides(1)
Call DoVersionInfo("myInfo", 15, 560.75, 100, 32.125)
End With
End Sub
[/vba]
[vba]
Sub DoVersionInfo(Nm As String, tp As Single, lft As Single, wdth As Single, ht As Single)
Dim MyPath As String
MyPath = Application.ActivePresentation.FullName
With ActivePresentation.Slides(1).Shapes.Range.TextFrame.TextRange
If Nm = "myInfo" Then
.Delete
End If
End With
With ActivePresentation.Slides(1).Shapes.AddLabel(msoTextOrientationHorizontal, Top:=tp, Left:=lft, Width:=wdth, Height:=ht)
With .TextFrame.TextRange
.Text = " -- " & MyPath
.Characters(Start:=1, Length:=0).InsertDateTime DateTimeFormat:=ppDateTimeMMddyyHmm, InsertAsField:=msoTrue
.ParagraphFormat.Alignment = ppAlignRight
With .Paragraphs(1, 2).Font
.Size = 10
.Color = RGB(0, 48, 130)
.Bold = msoTrue
End With
End With
End With
End Sub
[/vba]