Untitled
unknown
plain_text
2 years ago
2.6 kB
9
Indexable
Sub CreateFoodPresentation()
Dim pptApp As Object
Dim pptPresentation As Object
Dim pptSlide As Object
Dim pptTextbox As Object
' Create a new PowerPoint application
Set pptApp = CreateObject("PowerPoint.Application")
pptApp.Visible = True
' Create a new presentation
Set pptPresentation = pptApp.Presentations.Add
' Slide 1: Title
Set pptSlide = pptPresentation.Slides.Add(1, ppLayoutTitle)
pptSlide.Shapes.Title.TextFrame.TextRange.Text = "Taking Food in Our Daily Life"
' Slide 2: The Importance of Healthy Eating
Set pptSlide = pptPresentation.Slides.Add(2, ppLayoutText)
pptSlide.Shapes.Title.TextFrame.TextRange.Text = "The Importance of Healthy Eating"
Set pptTextbox = pptSlide.Shapes.AddTextbox(Orientation:=1, Left:=50, Top:=100, Width:=600, Height:=200)
pptTextbox.TextFrame.TextRange.Text = "Eating nutritious foods is essential for our well-being. It provides the energy and nutrients we need for our daily activities and helps maintain good health."
' Slide 3: Balanced Diet
Set pptSlide = pptPresentation.Slides.Add(3, ppLayoutText)
pptSlide.Shapes.Title.TextFrame.TextRange.Text = "Balanced Diet"
Set pptTextbox = pptSlide.Shapes.AddTextbox(Orientation:=1, Left:=50, Top:=100, Width:=600, Height:=200)
pptTextbox.TextFrame.TextRange.Text = "A balanced diet includes a variety of foods from all food groups - fruits, vegetables, grains, protein, and dairy. It ensures we get the right nutrients for optimal health."
' Slide 4: Cooking at Home
Set pptSlide = pptPresentation.Slides.Add(4, ppLayoutText)
pptSlide.Shapes.Title.TextFrame.TextRange.Text = "Cooking at Home"
Set pptTextbox = pptSlide.Shapes.AddTextbox(Orientation:=1, Left:=50, Top:=100, Width:=600, Height:=200)
pptTextbox.TextFrame.TextRange.Text = "Preparing meals at home allows us to control ingredients and make healthier choices. It's a great way to bond with family and friends over food."
' Slide 5: Mindful Eating
Set pptSlide = pptPresentation.Slides.Add(5, ppLayoutText)
pptSlide.Shapes.Title.TextFrame.TextRange.Text = "Mindful Eating"
Set pptTextbox = pptSlide.Shapes.AddTextbox(Orientation:=1, Left:=50, Top:=100, Width:=600, Height:=200)
pptTextbox.TextFrame.TextRange.Text = "Eating mindfully means savoring each bite, paying attention to hunger and fullness cues, and enjoying the sensory experience of food."
' Clean up
Set pptTextbox = Nothing
Set pptSlide = Nothing
Set pptPresentation = Nothing
Set pptApp = Nothing
End Sub
Editor is loading...