Powerpoint: Difference between revisions

From AutoIt Wiki
Jump to navigation Jump to search
 
(6 intermediate revisions by the same user not shown)
Line 8: Line 8:
The PowerPoint UDF is based on the following concept:
The PowerPoint UDF is based on the following concept:


* Use function _PPT_Open as the first step in your script to start up PowerPoint or to connect to a running instance.
* Use function ''_PPT_Open'' as the first step in your script to start up PowerPoint or to connect to a running instance.
* Some functions allow to process just a single Slide and others allow a range of Slides.
* Some functions allow to process just a single Slide and others allow a range of Slides.
** The UDF always uses the SlideRange object when working with Slides.<br>Use function _PPT_SlideRangeSet to specify the Slides to process, then call a function and pass the range as parameter.
** The UDF always uses the SlideRange object when working with Slides.<br>Use function ''_PPT_SlideRangeSet'' to specify the Slides to process, then call a function and pass the SlideRange as parameter.
** For details please check the description of the specific function.
** For details please check the description of the specific function.
* Some functions allow to process just a single Shape and others allow a range of Shapes.
* Some functions allow to process just a single Shape and others allow a range of Shapes.
** The UDF always uses the ShapeRange object when working with Shapes.<br>Use function _PPT_ShapeRangeSet to specify the Shapes to process, then call a function and pass the range as parameter.
** The UDF always uses the ShapeRange object when working with Shapes.<br>Use function ''_PPT_ShapeRangeSet'' to specify the Shapes to process, then call a function and pass the ShapeRange as parameter.
** For details please check the description of the specific function.
** For details please check the description of the specific function.
* Use function _PPT_Close as the last step in your script to shutdown PowerPoint or to release the connection to a running instance.
* Use function ''_PPT_Close'' as the last step in your script to shutdown PowerPoint or to release the connection to a running instance.


=== PowerPoint ===
=== PowerPoint ===


===== Terms =====
===== Definitions =====
* '''SlideMaster''':  
* '''HandoutMaster''': The Handout Master controls what the slides on the audience handouts will look like. The slide image placeholders show where slides are placed on the master.
* '''HandoutMaster''':
* '''NotesMaster''': The Notes Master lets you alter the appearance of the “Notes Page” presentation view.
* '''NotesMaster''':
* '''ShapeRange''': Represents a subset of the Shapes in a Slide.
* '''TitleMaster''':
* '''SlideMaster''': A Slide Master is the top slide in a hierarchy of slides that stores information about the theme and slide layouts of a presentation, including the background, color, fonts, effects, placeholder sizes, and positioning.
* '''SlideRange''':
* The '''SlideNumber''' property of a Slide object is the actual number that appears in the lower-right corner of the Slide when you display slide numbers.<br> This number is determined by the number of the Slide within the Presentation (the '''SlideIndex''' property value) and the starting slide number for the Presentation (the FirstSlideNumber property value).
* '''ShapeRange''':
* '''SlideRange''': Represents a subset of the Slides in a Presentation.
 
* '''Template''': A template is a theme plus some content for a specific purpose—such as a sales presentation, a business plan, or a classroom lesson.<br>So a template has design elements that work together (colors, fonts, backgrounds, effects) and boilerplate content that you augment to tell your story. Details can be found [https://support.microsoft.com/en-us/office/understand-the-difference-between-powerpoint-templates-and-themes-e2408e10-e015-43b3-8b29-b99d128ae448#bm1 here].
* '''Theme''': A theme is a predefined set of colors, fonts, and visual effects that you apply to your slides for a unified, professional look. Details can be found [https://support.microsoft.com/en-us/office/understand-the-difference-between-powerpoint-templates-and-themes-e2408e10-e015-43b3-8b29-b99d128ae448 here].
* '''TitleMaster''': The Title Master controls "title" slides. Typically just the first slide of your presentation.
===== Concepts =====
===== Concepts =====
You can get an overview of the concepts of PowerPoint on [https://docs.microsoft.com/en-us/office/vba/powerpoint/concepts/concepts-powerpoint-vba-reference this website].
You can get an overview of the concepts of PowerPoint on [https://docs.microsoft.com/en-us/office/vba/powerpoint/concepts/concepts-powerpoint-vba-reference this website].


===== Object model =====
===== Object model =====
The PowerPoint object model is described [https://docs.microsoft.com/en-us/office/vba/api/overview/powerpoint/object-model here].
The PowerPoint object model is described [https://docs.microsoft.com/en-us/office/vba/api/overview/powerpoint/object-model here].<br>
A very good description of the object model tree can be found [https://www.codevba.com/PowerPoint/ here].


== Example Scripts ==
== Example Scripts ==
Line 44: Line 47:
=== Find an Item ===
=== Find an Item ===
Further information on how to ...: [[Link]]
Further information on how to ...: [[Link]]
== Tips and Tricks ==
=== SlideShow ===
To hide a Slide during a Slide Show use the following code:
<syntaxhighlight lang="autoit">$oPresentation.Slides(x).SlideShowTransition.Hidden = True ; Replace x with the SlideIndex or Name property of the Slide to hide</syntaxhighlight>

Latest revision as of 14:05, 31 August 2021

This page is still a work in progress.

The PowerPoint UDF offers basic functions to control and manipulate Microsoft PowerPoint.

Concepts

UDF

The PowerPoint UDF is based on the following concept:

  • Use function _PPT_Open as the first step in your script to start up PowerPoint or to connect to a running instance.
  • Some functions allow to process just a single Slide and others allow a range of Slides.
    • The UDF always uses the SlideRange object when working with Slides.
      Use function _PPT_SlideRangeSet to specify the Slides to process, then call a function and pass the SlideRange as parameter.
    • For details please check the description of the specific function.
  • Some functions allow to process just a single Shape and others allow a range of Shapes.
    • The UDF always uses the ShapeRange object when working with Shapes.
      Use function _PPT_ShapeRangeSet to specify the Shapes to process, then call a function and pass the ShapeRange as parameter.
    • For details please check the description of the specific function.
  • Use function _PPT_Close as the last step in your script to shutdown PowerPoint or to release the connection to a running instance.

PowerPoint

Definitions
  • HandoutMaster: The Handout Master controls what the slides on the audience handouts will look like. The slide image placeholders show where slides are placed on the master.
  • NotesMaster: The Notes Master lets you alter the appearance of the “Notes Page” presentation view.
  • ShapeRange: Represents a subset of the Shapes in a Slide.
  • SlideMaster: A Slide Master is the top slide in a hierarchy of slides that stores information about the theme and slide layouts of a presentation, including the background, color, fonts, effects, placeholder sizes, and positioning.
  • The SlideNumber property of a Slide object is the actual number that appears in the lower-right corner of the Slide when you display slide numbers.
    This number is determined by the number of the Slide within the Presentation (the SlideIndex property value) and the starting slide number for the Presentation (the FirstSlideNumber property value).
  • SlideRange: Represents a subset of the Slides in a Presentation.
  • Template: A template is a theme plus some content for a specific purpose—such as a sales presentation, a business plan, or a classroom lesson.
    So a template has design elements that work together (colors, fonts, backgrounds, effects) and boilerplate content that you augment to tell your story. Details can be found here.
  • Theme: A theme is a predefined set of colors, fonts, and visual effects that you apply to your slides for a unified, professional look. Details can be found here.
  • TitleMaster: The Title Master controls "title" slides. Typically just the first slide of your presentation.
Concepts

You can get an overview of the concepts of PowerPoint on this website.

Object model

The PowerPoint object model is described here.
A very good description of the object model tree can be found here.

Example Scripts

For single functions

Every function of the UDF comes with an example script (except internal functions). The example script is named like the function.

Extended Examples

Example scripts which describe more than a single function of the UDF are prefixed with _PPT_Example_.

Function specific pages

The following pages contain information for the functions that can be used for many different item types.

Find an Item

Further information on how to ...: Link

Tips and Tricks

SlideShow

To hide a Slide during a Slide Show use the following code:

$oPresentation.Slides(x).SlideShowTransition.Hidden = True ; Replace x with the SlideIndex or Name property of the Slide to hide