Programming PowerPoint With VBA Straight to the Point
eBook - ePub

Programming PowerPoint With VBA Straight to the Point

Eduardo N Sanchez

Compartir libro
  1. 57 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

Programming PowerPoint With VBA Straight to the Point

Eduardo N Sanchez

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

This book assumes you already use PowerPoint and want to automate or enhance your presentations using Visual Basic for Applications (VBA). This book includes VBA samples for working with layouts, themes & masters, creating tables, drawing objects, charting, animation effects and event programming. It also includes a chapter for interfacing between PowerPoint and Word, Excel, Access or Outlook.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es Programming PowerPoint With VBA Straight to the Point un PDF/ePUB en línea?
Sí, puedes acceder a Programming PowerPoint With VBA Straight to the Point de Eduardo N Sanchez en formato PDF o ePUB, así como a otros libros populares de Informatica y Applicazioni desktop. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Año
2022
ISBN
9781615471638
Edición
1
Categoría
Informatica
1 Basic Operations
Introduction
There is a joke saying that PowerPoint is a free application that comes along when you buy Excel…
Actually, PowerPoint is a complex program that offers everything you need to create and manage professionally built presentations.
This book assumes you are already a PowerPoint user who wants to automate and enhance your presentations using Visual Basic for Applications, which is currently the Office programming language. It is also a pre-requisite that you have basic knowledge on how VBA works, as we do not have room here to teach it from the ground up.
We will review some concepts, but the main goal of this book will be to show how VBA can make PowerPoint even better. Welcome aboard!
Creating a simple presentation
Our first example is quite straightforward: the code generates a new presentation with six slides, each one containing a title and a bulleted list. The picture below shows the final result. Observe that the chosen layout contains two shapes; the first one will hold the slide title whereas the second will be used for the list.
Sub AddSlides()
Dim Pre As Presentation, sld As Slide, i%, j%
Set Pre = Presentations.Add(msoTrue)
j = 1
For i = 1 To 6
Set sld = Pre.Slides.Add(Index:=Pre.Slides.Count + 1, Layout:=ppLayoutText)
sld.Shapes(1).TextFrame.TextRange = "Title of Slide " &i
sld.Shapes(2).TextFrame.TextRange = "Line " &CStr(j) &vbNewLine& _
"Line " &CStr(j + 1) &vbNewLine& "Line " &CStr(j + 2) &vbNewLine
j = j + 3
Next
End Sub
This presentation was created with VBA
Where is the macro recorder?
Excel programmers know of this handy tool that records actions and generates the corresponding code. It often requires adjustments, but will give you the necessary properties and methods for that particular task. For example, if you format some text with the recorder turned on, it will give you VBA code that you can play back to do the same job again.
Unfortunately, since PowerPoint 2007 Microsoft removed this functionality from the program.
Object Browser and Intellisense
Two features that will help finding needed properties and methods are the object browser window and the so called Intellisense menu.
To activate the object browser view, just press the F2 key when in the VB editor; you will see something similar to the image beneath. It can be used to browse the object tree and search for the available elements. To return to the code window, press F7.
Choose a class to see a list of its members
Another useful feature is the dropdown menu that appears when you type a period after an object in the VB editor. It will list most of the valid properties and methods you can use with that specific object. To make sure this option is active, go to Tools > Options and confirm that auto list members is checked.
The dropdown displays a list of options.
Saving as PDF
It is simple to save a presentat...

Índice