Boom sprayer test work

Ғылым және технология

Sub CreatePresentation()
Dim pptApp As Object
Dim pptPres As Object
Dim slideIndex As Integer
Dim imagePath As String
' Create a new PowerPoint application
Set pptApp = CreateObject("PowerPoint.Application")
pptApp.Visible = True
' Create a new presentation
Set pptPres = pptApp.Presentations.Add
' Slide 1: Title Slide
slideIndex = 1
pptPres.Slides.Add slideIndex, 1 ' 1 is ppLayoutTitle
With pptPres.Slides(slideIndex)
.Shapes.Title.TextFrame.TextRange.Text = "Comparison of Facebook Ads and KZread Ads"
.Shapes.Placeholders(2).TextFrame.TextRange.Text = "A comprehensive look at social media advertising"
End With
' Slide 2: Facebook Ads
slideIndex = slideIndex + 1
pptPres.Slides.Add slideIndex, 2 ' 2 is ppLayoutText
With pptPres.Slides(slideIndex)
.Shapes.Title.TextFrame.TextRange.Text = "Facebook Ads"
.Shapes.Placeholders(2).TextFrame.TextRange.Text = "• Targeting options
• Ad formats
• Performance metrics"
' Add an image for Facebook Ads
imagePath = "C:\Path\To\Your\FacebookAdsImage.jpg" ' Replace with your image path
.Shapes.AddPicture imagePath, _
msoFalse, msoCTrue, _
100, 150, 400, 300 ' Adjust position and size as needed
End With
' Slide 3: KZread Ads
slideIndex = slideIndex + 1
pptPres.Slides.Add slideIndex, 2 ' 2 is ppLayoutText
With pptPres.Slides(slideIndex)
.Shapes.Title.TextFrame.TextRange.Text = "KZread Ads"
.Shapes.Placeholders(2).TextFrame.TextRange.Text = "• Ad formats
• Targeting options
• Performance metrics"
' Add an image for KZread Ads
imagePath = "C:\Path\To\Your\KZreadAdsImage.jpg" ' Replace with your image path
.Shapes.AddPicture imagePath, _
msoFalse, msoCTrue, _
100, 150, 400, 300 ' Adjust position and size as needed
End With
' Save the presentation
pptPres.SaveAs "C:\Path\To\Save\Your\Presentation.pptx" ' Replace with your desired save path
pptPres.Close
pptApp.Quit
' Release the objects
Set pptPres = Nothing
Set pptApp = Nothing
End Sub

Пікірлер

    Келесі