Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > microsoft.public.office.developer.automation > #2

.Paragraphs.Add cant get past this one. Trying to make template presentation

Newsgroups microsoft.public.office.developer.automation
Date 2023-06-19 09:09 -0700
Message-ID <1dfd906a-2f4e-45eb-93cf-b2b2cc501bb3n@googlegroups.com> (permalink)
Subject .Paragraphs.Add cant get past this one. Trying to make template presentation
From lloyd link <lloydlink12@gmail.com>

Show all headers | View raw


Sub CreatePresentation()
    Dim pptApp As PowerPoint.Application
    Dim pptPres As PowerPoint.Presentation
    Dim pptSlide As PowerPoint.Slide
    Dim slideNum As Integer
    
    ' Create a new PowerPoint application
    Set pptApp = New PowerPoint.Application
    pptApp.Visible = True
    
    ' Create a new presentation
    Set pptPres = pptApp.Presentations.Add
    
    ' Slide 1 - Title Slide
    Set pptSlide = pptPres.Slides.Add(1, ppLayoutTitle)
    With pptSlide.Shapes.Title.TextFrame.TextRange
        .Text = "Tech Utilization Designer"
        .Font.Name = "Arial"
        .Font.Size = 36
        .Font.Bold = True
        .ParagraphFormat.Alignment = ppAlignCenter
    End With
    
    ' Slide 2 - Introduction
    slideNum = 2
    Set pptSlide = pptPres.Slides.Add(slideNum, ppLayoutText)
    With pptSlide.Shapes.Title.TextFrame.TextRange
        .Text = "Introduction"
        .Font.Name = "Arial"
        .Font.Size = 24
        .Font.Bold = True
        .ParagraphFormat.Alignment = ppAlignLeft
    End With
    With pptSlide.Shapes.Placeholders(2).TextFrame2.TextRange
        .Text = "Tech Utilization Designer is a powerful tool that helps designers efficiently leverage technology in their projects. It provides a comprehensive set of features and capabilities to streamline the design process and maximize the use of technological resources."
        .Font.Name = "Arial"
        .Font.Size = 20
        .ParagraphFormat.Alignment = ppAlignLeft
    End With
    
    ' Slide 3 - Key Features
    slideNum = 3
    Set pptSlide = pptPres.Slides.Add(slideNum, ppLayoutText)
    With pptSlide.Shapes.Title.TextFrame.TextRange
        .Text = "Key Features"
        .Font.Name = "Arial"
        .Font.Size = 24
        .Font.Bold = True
        .ParagraphFormat.Alignment = ppAlignLeft
    End With
    With pptSlide.Shapes.Placeholders(2).TextFrame2.TextRange
        .Text = "Tech Utilization Designer offers a range of advanced features, including:"
        .Font.Name = "Arial"
        .Font.Size = 20
        .ParagraphFormat.Alignment = ppAlignLeft
        .Paragraphs.Add
        .Paragraphs(.Paragraphs.Count).Text = "1. Integration with industry-leading design software"
        .Paragraphs.Add
        .Paragraphs(.Paragraphs.Count).Text = "2. Automated technology assessment and selection"
        .Paragraphs.Add
        .Paragraphs(.Paragraphs.Count).Text = "3. Real-time collaboration and feedback"
        .Paragraphs.Add
        .Paragraphs(.Paragraphs.Count).Text = "4. Intelligent resource allocation and optimization"
    End With
    
    ' Slide 4 - Benefits
    slideNum = 4
    Set pptSlide = pptPres.Slides.Add(slideNum, ppLayoutText)
    With pptSlide.Shapes.Title.TextFrame.TextRange
        .Text = "Benefits"
        .Font.Name = "Arial"
        .Font.Size = 24
        .Font.Bold = True
        .ParagraphFormat.Alignment = ppAlignLeft
    End With
    With pptSlide.Shapes.Placeholders(2).TextFrame2.TextRange
        .Text = "By using Tech Utilization Designer, designers can enjoy the following benefits:"
        .Font.Name = "Arial"
        .Font.Size = 20
        .ParagraphFormat.Alignment = ppAlignLeft
        .Paragraphs.Add
        .Paragraphs(.Paragraphs.Count).Text = "1. Increased efficiency and productivity"
        .Paragraphs.Add
        .Paragraphs(.Paragraphs.Count).Text = "2. Enhanced collaboration and communication"
        .Paragraphs.Add
        .Paragraphs(.Paragraphs.Count).Text = "3. Optimal use of available technology resources"
        .Paragraphs.Add
        .Paragraphs(.Paragraphs.Count).Text = "4. Improved design quality and innovation"
    End With
    
    ' Slide 5 - Conclusion
    slideNum = 5
    Set pptSlide = pptPres.Slides.Add(slideNum, ppLayoutText)
    With pptSlide.Shapes.Title.TextFrame.TextRange
        .Text = "Conclusion"
        .Font.Name = "Arial"
        .Font.Size = 24
        .Font.Bold = True
        .ParagraphFormat.Alignment = ppAlignLeft
    End With
    With pptSlide.Shapes.Placeholders(2).TextFrame2.TextRange
        .Text = "In summary, Tech Utilization Designer empowers designers to leverage technology effectively and efficiently, unlocking their full potential in the design process. By utilizing its advanced features, designers can revolutionize their workflows and achieve outstanding results."
        .Font.Name = "Arial"
        .Font.Size = 20
        .ParagraphFormat.Alignment = ppAlignLeft
    End With
    
    ' Save the presentation
    pptPres.SaveAs "C:\Path\to\save\presentation.pptx"
    
    ' Clean up
    pptApp.Quit
    Set pptApp = Nothing
    Set pptPres = Nothing
    Set pptSlide = Nothing
    
    MsgBox "Presentation created successfully!"
End Sub

Back to microsoft.public.office.developer.automation | Previous | Find similar | Unroll thread


Thread

.Paragraphs.Add cant get past this one. Trying to make template presentation lloyd link <lloydlink12@gmail.com> - 2023-06-19 09:09 -0700

csiph-web