Article View: microsoft.public.office.developer.automation
Article #1.Paragraphs.Add cant get past this one. Trying to make template presentation
From: lloyd link
Date: Mon, 19 Jun 2023 16:09
Date: Mon, 19 Jun 2023 16:09
134 lines
6532 bytes
6532 bytes
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
Technical Details
Message-ID:
<1dfd906a-2f4e-45eb-93cf-b2b2cc501bb3n@googlegroups.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf9.newsdeef.eu!nnrp.usenet.blueworldhosting.com!!spool1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mailShow Full Headers
Complete Article Headers
Message-ID: <1dfd906a-2f4e-45eb-93cf-b2b2cc501bb3n@googlegroups.com> Subject: .Paragraphs.Add cant get past this one. Trying to make template presentation Date: Mon, 19 Jun 2023 16:09:50 +0000 From: lloyd link <lloydlink12@gmail.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf9.newsdeef.eu!nnrp.usenet.blueworldhosting.com!!spool1.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer01.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail X-Received: by 2002:a05:622a:1a11:b0:3f6:c5c7:fc4a with SMTP id f17-20020a05622a1a1100b003f6c5c7fc4amr4691694qtb.5.1687190991136; X-Received: by 2002:ad4:4e02:0:b0:62d:ea15:13e6 with SMTP id dl2-20020ad44e02000000b0062dea1513e6mr1707990qvb.8.1687190990756; Mon, 19 Jun Newsgroups: microsoft.public.office.developer.automation Injection-Info: google-groups.googlegroups.com; posting-host=2605:59c8:6029:5f00:384b:68b5:623:e82f; posting-account=HZvujgoAAABOVzfu_z85Oy4yPGbNQOZn NNTP-Posting-Host: 2605:59c8:6029:5f00:384b:68b5:623:e82f User-Agent: G2/1.0 MIME-Version: 1.0 Injection-Date: Mon, 19 Jun 2023 16:09:51 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Received-Bytes: 6173