Creating PowerPoint Presentations with VBA Code Automation using ChatGPT

## Link to Prompt

What the Prompt does

  • Use GPT-4 to create a PowerPoint presentation in 3 mins using Visual Basic Editor. Quick, easy, powerful slides.
  • Productivity, Create Powerpoint Presentation and Slides in 3 Minutes

Example Prompt Output GPT4

Sure! I can help you with that. However, since I am a text-based AI model, I can’t directly create PowerPoint slides for you. I can, however, provide you with a VBA code template that you can use to create PowerPoint slides about your desired topic. You can copy and paste the code into the VBA editor in PowerPoint and modify it according to your needs. Here’s a sample code to get you started:

Sub CreateSlides()
    Dim pptApp As Object
    Dim pptPres As Object
    Dim pptSlide As Object
    
    ' Create PowerPoint application
    Set pptApp = CreateObject("PowerPoint.Application")
    pptApp.Visible = True
    
    ' Create a new presentation
    Set pptPres = pptApp.Presentations.Add
    
    ' Add slides
    Set pptSlide = pptPres.Slides.Add(1, 11) ' 11 represents the slide layout
    
    ' Slide 1
    With pptSlide
        .Shapes.Title.TextFrame.TextRange.Text = "Slide 1"
        .Shapes(2).TextFrame.TextRange.Text = "Insert content here"
    End With
    
    ' Slide 2
    Set pptSlide = pptPres.Slides.Add(2, 11)
    With pptSlide
        .Shapes.Title.TextFrame.TextRange.Text = "Slide 2"
        .Shapes(2).TextFrame.TextRange.Text = "Insert content here"
    End With
    
    ' Slide 3
    Set pptSlide = pptPres.Slides.Add(3, 11)
    With pptSlide
        .Shapes.Title.TextFrame.TextRange.Text = "Slide 3"
        .Shapes(2).TextFrame.TextRange.Text = "Insert content here"
    End With
    
    ' Continue adding slides as needed
    
    ' Save and close the presentation
    pptPres.SaveAs "C:\Path\to\save\presentation.pptx"
    pptPres.Close
    
    ' Quit PowerPoint application
    pptApp.Quit
    
    ' Clean up
    Set pptSlide = Nothing
    Set pptPres = Nothing
    Set pptApp = Nothing
End Sub

To use this code, follow these steps:

  1. Open PowerPoint and press Alt+F11 to open the VBA editor.
  2. Insert a new module by clicking Insert > Module.
  3. Copy and paste the above code into the module.
  4. Modify the code to add your desired content to each slide. You can change the slide titles and insert content in the placeholder.
  5. Adjust the slide layout code (11) as per your requirements. You can refer to the PowerPoint VBA documentation for other layout options.
  6. Modify the file path in the SaveAs method to specify where you want to save the presentation.
  7. Press F5 to run the code and create the slides.

Remember to replace the placeholder text and customize the code according to your needs. Feel free to add more slides using the provided template.

How I came up with it

Came up as I Have to do many Presentations every day

WARNING: Just dumping your Prompt link here won’t cut it, and may be removed by moderators

Please complete missing points:

I’m not able to edit my post so Pasting the points here for the given feedback:

  1. Examples of Input:

Hi ChatGPT, Act as a VBA programmer. Write me VBA code to create PowerPoint slides about [Insert your Topic Name] . Think like a Powerpoint Expert . Use your knowledge and create at least 10 slides. Target Language should be English

  1. Who is it for?
    Users who would like to create presentations, Users can be Students, Employees, Teachers etc.

  2. The Pain point of the prompt is design to solve?
    Save time by manually creating presentation by adding slides and then information to it. With this propmpt you will have the slides created autoamtically with information in it.

1 Like

Click the 3 dots icon on your post, then click the :pencil2: icon to edit.

1 Like

I do not see the three dots on the post.

HOwever I could see the three dots for my comment that I replied with.

1 Like