I have a PowerPoint called Bell Ringers. I want to set it up so that every school day it creates a new slide. The new slide will always have the same textbox on top (the instructions). It should also grab a graphic/picture from a folder I created called Bell Ringer Pictures. That folder can be stored somewhere in OneDrive.
Any suggestions?
You can create a PowerPoint that auto-advances a slide every 24 hours (well, 23:59:59 I think!)
We used to use plugins for PowerPoint so we could use a PC as a kiosk machine showing pictures.
Quick Google came up with this, there are probably other similar options.
This part should be easy, as I recall PowerPoint has a “template” slide. A quick Google suggest “Open Slide Master View”. I believe that PowerPoint is scriptable, just like all other Office apps, probably using VBA. PowerPoint macros: Basics and introductory tutorial - IONOS CA You might be able to ask ChatGPT to create such a macro for you? I just tried, and the output is pretty long, hopefully it will translate well here.
Can you create a PowerPoint macro script that every school day it creates a new slide. The new slide will always have the same textbox on top (the instructions). It should also grab a graphic/picture from a folder I created.
ChatGPT said:
Certainly! To achieve this, you can use VBA (Visual Basic for Applications) to create a PowerPoint macro. Below, I'll outline a VBA macro that does the following:
Creates a new slide each school day.
Adds a textbox with predefined instructions to the top of the slide.
Inserts a picture from a specified folder.
Here's a step-by-step guide to creating the macro:
1. Prepare Your PowerPoint
Open your PowerPoint presentation where you want the macro to run.
2. Open the VBA Editor
Press ALT + F11 to open the VBA editor.
Go to Insert > Module to create a new module.
3. Enter the VBA Code
Copy and paste the following VBA code into the module:
Sub CreateNewSlideDaily()
Dim slideIndex As Integer
Dim slide As slide
Dim textBox As shape
Dim picturePath As String
Dim pictureFileName As String
Dim pic As shape
Dim instructionsText As String
' Define your instructions text
instructionsText = "Please follow the instructions below."
' Define the folder path where your pictures are stored
picturePath = "C:\Path\To\Your\PictureFolder\"
' Define the picture file name
pictureFileName = "YourPicture.jpg" ' Update this to your actual picture file name
' Check if today is a school day and if so, create a new slide
If IsSchoolDay(Date) Then
' Add a new slide
slideIndex = ActivePresentation.Slides.Count + 1
Set slide = ActivePresentation.Slides.Add(slideIndex, ppLayoutText)
' Add the instructions text box
Set textBox = slide.Shapes.AddTextbox(msoTextOrientationHorizontal, 0, 0, slide.Master.Width, 100)
textBox.TextFrame.TextRange.Text = instructionsText
textBox.TextFrame.TextRange.ParagraphFormat.Alignment = ppAlignCenter
' Add the picture
Set pic = slide.Shapes.AddPicture(FileName:=picturePath & pictureFileName, LinkToFile:=msoFalse, _
SaveWithDocument:=msoCTrue, Left:=100, Top:=150, Width:=500, Height:=375)
' Optionally, you can adjust picture positioning and size as needed
End If
End Sub
Function IsSchoolDay(d As Date) As Boolean
' Example: Let's assume school days are Monday to Friday
Dim dayOfWeek As Integer
dayOfWeek = Weekday(d, vbMonday)
' Check if today is a weekday (Monday to Friday)
If dayOfWeek >= 1 And dayOfWeek <= 5 Then
IsSchoolDay = True
Else
IsSchoolDay = False
End If
End Function
4. Update the Code
Make sure to update the picturePath and pictureFileName variables to match the location and name of the picture you want to use. Also, adjust the Left, Top, Width, and Height parameters for the AddPicture method to fit your slide layout.
5. Running the Macro
You can manually run the macro by pressing F5 in the VBA editor or by creating a button in PowerPoint that executes the macro. To set up a button:
Go back to PowerPoint and insert a new shape (e.g., a rectangle) from the Insert tab.
Right-click the shape and select Assign Macro.
Choose CreateNewSlideDaily from the list and click OK.
6. Automate the Macro
PowerPoint doesn’t have a built-in scheduler for macros, so you’ll need to run this macro manually or use a third-party scheduling tool to automate it on school days.
This macro creates a new slide with the specified textbox and picture every time it's run, as long as the day is identified as a school day. If you need more advanced scheduling or logic, you might need to integrate with additional tools or scripts.
Brilliant use of AI. I’ll give a whirl tomorrow.
Thanks.