R
Rob
All,
I'm having a difficult time trying to work out a seemingly simple task.
I have a staff meeting every 7 days; 11 different work-sections add thier
inputs to the weekly staff meeting slides. It's very importatnt that the
data in the slides be up-to-date, so I created a simple macro to grab each
individual powerpoint presentation from different folders on our LAN and add
them to the "main" slide.
Simple; each presentation is pulled into the main presentation with this
line of code
ActivePresentation.Slides.InsertFromFile "\\LAN Drive\staff
meeting\Operations\Operations.ppt", 1, 1, -1
ActivePresentation.Slides.InsertFromFile "\\LAN Drive\staff
meeting\Training\Training.ppt", 1, 1, -1
ActivePresentation.Slides.InsertFromFile "\\LAN Drive\staff
meeting\Budget\Budget.ppt", 1, 1, -1
etc.
etc.
etc.
My boss wanted to know if the data from the slides was up-to-date (was it
updated since the last meeting?), so I added the following code to add the
date the file was last saved to the Footer of the respective work-sections
title slide if it was older than 7 days old:
Dim MyStamp
MyStamp = FileDateTime(\\LAN Drive\staff
meeting\Operations\Operations.ppt)
If MyStamp < (Now - 7) Then
ActivePresentation.Slides.InsertFromFile "\\LAN Drive\staff
meeting\Operations\Operations.ppt", 1, 1, -1
ActivePresentation.Slides(2).HeadersFooters.Footer.Text = "Last
Updated " & Format(MyStamp)
Else
ActivePresentation.Slides.InsertFromFile "\\LAN Drive\staff
meeting\Operations\Operations.ppt", 1, 1, -1
End If
MyStamp = FileDateTime(\\LAN Drive\staff meeting\Training\Training.ppt)
If MyStamp < (Now - 7) Then
ActivePresentation.Slides.InsertFromFile "\\LAN Drive\staff
meeting\Training\Training.ppt", 1, 1, -1
ActivePresentation.Slides(2).HeadersFooters.Footer.Text = "Last
Updated " & Format(MyStamp)
Else
ActivePresentation.Slides.InsertFromFile \\LAN Drive\staff
meeting\Training\Training.ppt, 1, 1, -1
End If
etc.
etc.
Of course the boss still wasn't happy...if the work-sections data is older
than 7 days, he wants the Last Updated (date) font Color to be red and 14
pitch. I tried doing that with the footer, but I could not figure out how
to do it (maybe you can't).
What I want to do is create a textbox in each work-section title slide
(Which I did; I also formatted the textbox font). I then tried to add the
following code to make it update:
'blah blah blah
MyStamp = FileDateTime(\\LAN Drive\staff
meeting\Operations\Operations.ppt)
If MyStamp < (Now - 7) Then
ActivePresentation.Slides.InsertFromFile "\\LAN Drive\staff
meeting\Operations\Operations.ppt", 1, 1, -1
'*******Here's the code to add the date:***********
With ActivePresentation.Slides(2)
.Shapes("TextBox1").Name = "Last Updated" &
Format(MyStamp, "dd mmm yy")
End With
'******************************************
Else
ActivePresentation.Slides.InsertFromFile "\\LAN Drive\staff
meeting\Operations\Operations.ppt", 1, 1, -1
End If
.....
This will run without errors, but the textbox does not get updated... Can
you programatically update a texbox? Any suggestions?
Rob
I'm having a difficult time trying to work out a seemingly simple task.
I have a staff meeting every 7 days; 11 different work-sections add thier
inputs to the weekly staff meeting slides. It's very importatnt that the
data in the slides be up-to-date, so I created a simple macro to grab each
individual powerpoint presentation from different folders on our LAN and add
them to the "main" slide.
Simple; each presentation is pulled into the main presentation with this
line of code
ActivePresentation.Slides.InsertFromFile "\\LAN Drive\staff
meeting\Operations\Operations.ppt", 1, 1, -1
ActivePresentation.Slides.InsertFromFile "\\LAN Drive\staff
meeting\Training\Training.ppt", 1, 1, -1
ActivePresentation.Slides.InsertFromFile "\\LAN Drive\staff
meeting\Budget\Budget.ppt", 1, 1, -1
etc.
etc.
etc.
My boss wanted to know if the data from the slides was up-to-date (was it
updated since the last meeting?), so I added the following code to add the
date the file was last saved to the Footer of the respective work-sections
title slide if it was older than 7 days old:
Dim MyStamp
MyStamp = FileDateTime(\\LAN Drive\staff
meeting\Operations\Operations.ppt)
If MyStamp < (Now - 7) Then
ActivePresentation.Slides.InsertFromFile "\\LAN Drive\staff
meeting\Operations\Operations.ppt", 1, 1, -1
ActivePresentation.Slides(2).HeadersFooters.Footer.Text = "Last
Updated " & Format(MyStamp)
Else
ActivePresentation.Slides.InsertFromFile "\\LAN Drive\staff
meeting\Operations\Operations.ppt", 1, 1, -1
End If
MyStamp = FileDateTime(\\LAN Drive\staff meeting\Training\Training.ppt)
If MyStamp < (Now - 7) Then
ActivePresentation.Slides.InsertFromFile "\\LAN Drive\staff
meeting\Training\Training.ppt", 1, 1, -1
ActivePresentation.Slides(2).HeadersFooters.Footer.Text = "Last
Updated " & Format(MyStamp)
Else
ActivePresentation.Slides.InsertFromFile \\LAN Drive\staff
meeting\Training\Training.ppt, 1, 1, -1
End If
etc.
etc.
Of course the boss still wasn't happy...if the work-sections data is older
than 7 days, he wants the Last Updated (date) font Color to be red and 14
pitch. I tried doing that with the footer, but I could not figure out how
to do it (maybe you can't).
What I want to do is create a textbox in each work-section title slide
(Which I did; I also formatted the textbox font). I then tried to add the
following code to make it update:
'blah blah blah
MyStamp = FileDateTime(\\LAN Drive\staff
meeting\Operations\Operations.ppt)
If MyStamp < (Now - 7) Then
ActivePresentation.Slides.InsertFromFile "\\LAN Drive\staff
meeting\Operations\Operations.ppt", 1, 1, -1
'*******Here's the code to add the date:***********
With ActivePresentation.Slides(2)
.Shapes("TextBox1").Name = "Last Updated" &
Format(MyStamp, "dd mmm yy")
End With
'******************************************
Else
ActivePresentation.Slides.InsertFromFile "\\LAN Drive\staff
meeting\Operations\Operations.ppt", 1, 1, -1
End If
.....
This will run without errors, but the textbox does not get updated... Can
you programatically update a texbox? Any suggestions?
Rob