mail@pastecode.io avatar
a year ago
2.6 kB
Sub CreateAIPresentation()
    Dim pptApp As Object
    Dim pptPres As Object
    Dim pptSlide As Object

    ' Create a new PowerPoint presentation
    Set pptApp = CreateObject("PowerPoint.Application")
    Set pptPres = pptApp.Presentations.Add

    ' Slide 1 - Title
    Set pptSlide = pptPres.Slides.Add(1, 11)
    pptSlide.Shapes.Title.TextFrame.TextRange.Text = "History of Artificial Intelligence"
    pptSlide.Shapes(2).TextFrame.TextRange.Text = "AI has a rich and fascinating history that dates back several decades. Let's explore its journey."

    ' Slide 2 - Early Beginnings
    Set pptSlide = pptPres.Slides.Add(2, 11)
    pptSlide.Shapes.Title.TextFrame.TextRange.Text = "Early Beginnings"
    pptSlide.Shapes(2).TextFrame.TextRange.Text = "AI research can be traced back to the 1950s, when computer scientists began exploring the concept of 'thinking machines' capable of simulating human intelligence."

    ' Slide 3 - Development and AI Winter
    Set pptSlide = pptPres.Slides.Add(3, 11)
    pptSlide.Shapes.Title.TextFrame.TextRange.Text = "Development and AI Winter"
    pptSlide.Shapes(2).TextFrame.TextRange.Text = "During the 1960s and 1970s, significant progress was made in AI research. However, high expectations and lack of practical applications led to an 'AI winter' in the 1980s, with reduced funding and interest."

    ' Slide 4 - Emergence of Machine Learning
    Set pptSlide = pptPres.Slides.Add(4, 11)
    pptSlide.Shapes.Title.TextFrame.TextRange.Text = "Emergence of Machine Learning"
    pptSlide.Shapes(2).TextFrame.TextRange.Text = "In the 1990s, machine learning techniques gained prominence, allowing AI systems to learn from data and improve their performance over time. This period marked a resurgence of interest in AI."

    ' Slide 5 - Modern AI and Future Prospects
    Set pptSlide = pptPres.Slides.Add(5, 11)
    pptSlide.Shapes.Title.TextFrame.TextRange.Text = "Modern AI and Future Prospects"
    pptSlide.Shapes(2).TextFrame.TextRange.Text = "Today, AI has permeated various aspects of our lives. From virtual assistants to autonomous vehicles, AI is transforming industries and opening up exciting possibilities for the future."

    ' Save the PowerPoint presentation
    pptPres.SaveAs "C:\Path\To\Your\Presentation.pptx"
    ' Close the presentation and quit PowerPoint

    ' Clean up
    Set pptSlide = Nothing
    Set pptPres = Nothing
    Set pptApp = Nothing

    MsgBox "Presentation created successfully!"
End Sub