Auto_Open and Code tied to a slide
Hello Again,
I have the following question: Is it possible for a code in a module with Auto_Open to communicate in some way with code written in a specific slide in Powerpoint, anotherword for a variable to get passed from the code in the slide to the autorun in the module. this is my code:
Sub Auto_Open()
Dim oDate As Date
Dim UDate As Date
Dim promo As String
Dim i As Integer
oDate = Now()
MsgBox "You just opened the presentation." & vbCrLf & "Today's Date is:" & oDate
If MsgBox("Would you like to add a promotion message today", vbOKCancel) = vbOK Then
i = 1
promo = InputBox("Enter promotion text", "Enter Promotion Text")
For i = 1 To ActivePresentation.Slides.count
ActivePresentation.Slides(i).Shapes("Rectangle 2").TextFrame.TextRange = promo
Next i
Else
Exit Sub
End If
End Sub
Also for some reason I cannot execute the promo to be added to every slide it works if it is in the normal slide code view but it doesnt do it in the Auto_Open, is that not ossible as a whole?
Thanks,
george
|