How to Generate PowerPoint Slides using Bing Chat GPT-4

Subscribers:
839
Published on ● Video Link: https://www.youtube.com/watch?v=zogvDn5Kd8E



Duration: 2:41
49,285 views
202


My Prompt to Bing Chat: please write me VBA code to create powerpoint slides about 10 life lessons, each slide with a short story supporting the life lesson

Working VBA code generated by Bing Chat, after slight debugging:

Sub CreateSlides()
' Declare variables
Dim pptApp As PowerPoint.Application
Dim pptPres As PowerPoint.Presentation
Dim pptSlide As PowerPoint.Slide
Dim pptShape As PowerPoint.Shape
Dim i As Integer
Dim ppLayoutTitleAndText As PowerPoint.CustomLayout

' Create a new presentation
Set pptApp = New PowerPoint.Application
Set pptPres = pptApp.Presentations.Add
Set ppLayoutTitleAndText = pptPres.Designs(1).SlideMaster.CustomLayouts(1)

' Loop through 10 (shortened to 5) life lessons and stories
For i = 1 To 5

' Add a new slide with title and content layout
Set pptSlide = pptPres.Slides.AddSlide(i, ppLayoutTitleAndText)

' Select a life lesson and a story from the web search results
Select Case i

Case 1 ' Money will never solve your real problems (from index 1)
pptSlide.Shapes(1).TextFrame.TextRange.Text = "Money will never solve your real problems"
pptSlide.Shapes(2).TextFrame.TextRange.Text = "A man who had a lot of money but was unhappy decided to give away all his wealth to charity. He hoped that by doing so, he would find peace and happiness. However, he soon realized that his problems were not caused by his money, but by his attitude and expectations. He learned that money is just a tool, and happiness comes from within."

Case 2 ' Pace yourself (from index 1)
pptSlide.Shapes(1).TextFrame.TextRange.Text = "Pace yourself"
pptSlide.Shapes(2).TextFrame.TextRange.Text = "A young woman who wanted to achieve everything in life rushed into every opportunity that came her way. She worked hard, studied hard, traveled hard, and played hard. She thought that by doing everything at once, she would be successful and happy. However, she soon burned out and became exhausted and stressed. She learned that life is not a race, but a journey. She learned to slow down, enjoy the moment, and prioritize what matters most."

Case 3 ' You can't please everyone (from index 1)
pptSlide.Shapes(1).TextFrame.TextRange.Text = "You can't please everyone"
pptSlide.Shapes(2).TextFrame.TextRange.Text = "A boy who wanted to be liked by everyone tried to please everyone he met. He agreed with their opinions, did what they asked him to do, laughed at their jokes, and avoided any conflict or disagreement. He thought that by doing so, he would be popular and respected. However, he soon lost his sense of self and identity. He learned that people cannot give him the validation he sought. He learned to speak up, stick to his guns, assert himself when needed, and stay true to his values."

Case 4 ' Never underestimate the power of compound interest (from index 2)
pptSlide.Shapes(1).TextFrame.TextRange.Text = "Never underestimate the power of compound interest"
pptSlide.Shapes(2).TextFrame.TextRange.Text = "A girl who received $1000 as a gift from her grandparents when she was born decided to invest it in a savings account that earned 5% interest per year. She left it untouched until she turned 18 years old. By then, her $1000 had grown to $2406 thanks to compound interest. She continued to save $100 every month until she turned 65 years old. By then, her savings had grown to $447000 thanks to compound interest. She learned that saving money early and letting it grow can make a huge difference in the long run."

Case 5 ' Walk your own path (from index 2)
pptSlide.Shapes(1).TextFrame.TextRange.Text = "Walk your own path"
pptSlide.Shapes(2).TextFrame.TextRange.Text = "A boy who loved music wanted to pursue his passion as a career. However, his parents wanted him to become a doctor instead. They pressured him to follow their expectations and conform to their norms. He thought that by doing so, he would make them happy and proud. However, he soon felt miserable and unhappy. He learned that he had to follow his own path and march to the beat of his own drummer. He learned to resist peer pressure and avoid conformity."

End Select

Next i

End Sub







Tags:
Matrix Inception
ChatGPT
GPT-4
Bing