Discusión

Here is the VBA code for PowerPoint: ```vba Sub GenerateVBAForPowerPoint() ' This macro demonstrates how to create a new presentation and add a slide with a title and subtitle Dim pptApp As Object Dim pptPres As Object Dim pptSlide As Object ' Create a new instance of PowerPoint Set pptApp = CreateObject("PowerPoint.Application") pptApp.Visible = True ' Create a new presentation Set pptPres = pptApp.Presentations.Add ' Add a title slide (layout 1 is typically Title Slide) Set pptSlide = pptPres.Slides.Add(1, 1) ' Set the title text pptSlide.Shapes(1).TextFrame.TextRange.Text = "Hello, PowerPoint!" ' Set the subtitle text pptSlide.Shapes(2).TextFrame.TextRange.Text = "Generated with VBA" ' Optional: Save the presentation ' pptPres.SaveAs "C:\YourPath\YourPresentation.pptx" ' Clean up Set pptSlide = Nothing Set pptPres = Nothing Set pptApp = Nothing MsgBox "Presentation created successfully!" End Sub ```

De Wikiprompt, la enciclopedia libre de prompts

Paul Couvert
Contribuido porPaul CouvertXFuente

13 ago 2023

Here is the VBA code for PowerPoint: ```vba Sub GenerateVBAForPowerPoint() ' This macro demonstrates how to create a new presentation and add a slide with a title and subtitle Dim pptApp As Object Dim pptPres As Object Dim pptSlide As Object ' Create a new instance of PowerPoint Set pptApp = CreateObject("PowerPoint.Application") pptApp.Visible = True ' Create a new presentation Set pptPres = pptApp.Presentations.Add ' Add a title slide (layout 1 is typically Title Slide) Set pptSlide = pptPres.Slides.Add(1, 1) ' Set the title text pptSlide.Shapes(1).TextFrame.TextRange.Text = "Hello, PowerPoint!" ' Set the subtitle text pptSlide.Shapes(2).TextFrame.TextRange.Text = "Generated with VBA" ' Optional: Save the presentation ' pptPres.SaveAs "C:\YourPath\YourPresentation.pptx" ' Clean up Set pptSlide = Nothing Set pptPres = Nothing Set pptApp = Nothing MsgBox "Presentation created successfully!" End Sub ``` Un prompt para generar código VBA completo para crear diapositivas de PowerPoint con texto centrado y alineado a la izquierda.

Medios relacionados

Contenido del PromptGuardar

🌐
Ahora escribe el código VBA completo (desde la primera diapositiva hasta la última) para crear las diapositivas de PowerPoint para esta presentación. El texto debe estar centrado en las diapositivas y alineado a la izquierda.

Iniciá sesión para ver el prompt completo

Continuar con:

Al iniciar sesión, aceptás nuestros Términos de uso y Política de privacidad

Uso

Este prompt está diseñado para usarse con coding. Copiá el contenido de arriba y pegalo en tu herramienta de IA preferida.

Para mejores resultados, personalizá los marcadores (indicados con corchetes o mayúsculas) con tus requisitos específicos.

Referencias

Categorías:coding| twitter| vba| powerpoint

Discusión