Sub CreateConcr

You might also like

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 3

Sub CreateConcretePresentation()

Dim pptApp As Object ' PowerPoint.Application Dim pptPres As Object '

PowerPoint.Presentation Dim pptSlide As Object ' PowerPoint.Slide Dim slideIndex As Integer

' Create a new PowerPoint application

Set pptApp = CreateObject("PowerPoint.Application")

pptApp.Visible = True ' Show the PowerPoint application

' Create a new presentation

Set pptPres = pptApp.Presentations.Add

' Create slides

For slideIndex = 1 To 17 ' Total number of slides required ' Add a new slide
Set pptSlide = pptPres.Slides.Add(slideIndex, 11) ' 11 represents the slide layout type (Title and
Content)

' Set slide title

pptSlide.Shapes.Title.TextFrame.TextRange.Text = "Slide " & slideIndex

' Set slide content Select Case slideIndex

Case 1
pptSlide.Shapes(2).TextFrame.TextRange.Text = "Introduction to Concrete"

Case 2

pptSlide.Shapes(2).TextFrame.TextRange.Text = "Dry Packed Concrete"

' Add relevant information about dry packed concrete

Case 3

pptSlide.Shapes(2).TextFrame.TextRange.Text = "Lightweight Concrete"

' Add relevant information about lightweight concrete

Case 4

pptSlide.Shapes(2).TextFrame.TextRange.Text = "Reactive Powder Concrete

(RPC)" ' Add relevant information about reactive powder concrete

Case 5

pptSlide.Shapes(2).TextFrame.TextRange.Text = "Tremie Concrete"

' Add relevant information about tremie concrete

' Continue adding slides for each type of concrete

Case Else

' Handle additional slides if needed

End Select
Next slideIndex

' Clean up the PowerPoint objects Set

pptSlide = Nothing Set pptPres = Nothing

Set pptApp = Nothing

MsgBox "Presentation created

successfully!" End Sub

You might also like