MicrosoftPowerPoint connector
Use the MicrosoftPowerPoint connector to integrate Microsoft PowerPoint 2019 presentations into your solution. You can create, modify, and run a presentation.
The MicrosoftPowerPoint connector exposes the underlying COM components so that you can automate almost any PowerPoint task. The object model provides the following interfaces for you to work with:
- Applications – Provides access to PowerPoint and contains a collection of presentations.
- Presentations – Provides access to presentation-level operations and contains a slide collection.
- Slides – Provides access to a single slide and contains a shape collection (individual items on each slide are called shapes).
- Shapes – Provides access to a single shape on a slide.
When you add the connector to an automation, Pega Robot Studio places it in the Globals contaner of the project, so it can be used throughout the project.
The MicrosoftPowerPoint connector has the following properties, methods, and events.
Properties
Property | Description |
DisplayAlerts | For PowerPoint, set this property to False if you do not want to view prompts and alert messages while a program is running. If a message requires a response, PowerPoint chooses the default response. If you set this property to False, PowerPoint resets this property to True when the code is finished, unless you are running cross-process code. When you use the SaveAs method to overwrite a file, the Overwrite alert defaults to No. PowerPoint selects the Yes response when you set the DisplayAlerts property to False. When you use the SaveAs method to overwrite a file, the Overwrite alert defaults to No. PowerPoint selects the Yes response when you set the DisplayAlerts property to False. The default is True. |
IsRunning | Indicates whether the Microsoft Office application is running. |
Missing | Generates a System.Reflection.Missing.Value that
you can use as input for method parameters that you do not want to
specify. |
Mode | Specifies how to open the presentation file. |
PowerPointApplication | References the Microsoft PowerPoint COM instance. |
PowerPointApplicationActivePresentation | Specifies the active presentation in the PowerPoint application. |
PowerPointApplicationPresentations | Identifies the presentations collection in PowerPoint. |
PowerPointApplicationSlides | Lists the slides collection in PowerPoint. |
PowerPointPresentation | Refers to the PowerPoint presentation COM instance. |
PowerPointPresentationSlides | Specifies the collection of slides in the PowerPoint presentation that you want the connector to open. |
PowerPointWindowsHeight | Specifies the height of the PowerPoint window. |
PowerPointWindowsLeft | Specifies the left position of the PowerPoint window. |
PowerPointWindowsTop | Specifies the top position of the PowerPoint window. |
PowerPointWindowsWidth | Defines the width of the PowerPoint window. |
Presentation | Specifies the name of the presentation file. |
SlideCount | Indicates the number of slides in the presentation. |
SupportedName | Indicates the supported Microsoft Office name. |
SupportedVersion | Indicates the supported Microsoft Office version. |
This | References the connector object. |
Version | Specifies the PowerPoint version. |
Visible | Specifies whether the PowerPoint main window is visible. |
Methods
Method | Description | Parameters | Return Types |
Activate | Activates PowerPoint to bring it into focus. | Boolean, out string message | |
AddPictureToSlide | Adds a picture to a section (shape) of an existing slide. | Slide slide, Int32 shapeIndex, string picturePath | Boolean, out string message |
AddSlide | Adds a slide to the presentation. | Int32 index, PpSlideLayout layout | Boolean, out _Slide slide, out string |
AddTextToSlide | Adds text to a section (shape) of an existing slide. | Slide slide, Int32 shapeIndex, string text | Boolean, out string message |
ApplyTheme | Applies a theme to all slides in the presentation. | String themeFile | Boolean, out string message |
Close | Closes a currently opened presentation. | Void | |
CopySlide | Copies a slide to the clipboard. | Int32 index | Boolean, out string message |
CutSlide | Copies a slide to the clipboard and removes the slide from the presentation. | Int32 index | Boolean, out string message |
DeleteSlide | Deletes a slide from the presentation. | Int32 index | Boolean, out string message |
EndSlideShow | Ends the slide show. | Boolean, out string message | |
ExportToPdf | Saves the currently opened presentation as a PDF file. | string path | Boolean, out string message |
GetSlide | Gets a slide from the presentation. | Int32 index | Boolean, out _Slide slide, out string message |
GetSlideShapes | Gets shapes from a slide. | Slide slide | Boolean, out Shapes shape, out string message |
GetTextFromSlide | Gets the text from a shape on a slide in the presentation. | Slide slide, Int32 shapeIndex | Boolean, out string text, out string message |
Open (1 parameter) | Creates and opens a presentation using the file path that you specify. | string presentation | Void |
Open (2 parameters) | Creates and opens a presentation using the file path that you specify. Returns False and an error message if the operation fails. | string presentation | Boolean, out string message |
Open (3 parameters) | Creates and opens a presentation using the file path that you specify and applies the read-only property. Returns False and an error message if the operation fails. | string presentation, Boolean readOnly | Boolean, out string message |
PasteChart | Pastes a chart into a slide on the shape that you specify. | Slide slide, Int32 shapeIndex | Boolean, out string message |
PasteSlide | Adds the slide currently on the clipboard to the presentation. | Int32 index | Boolean, out string message |
RefreshChartData | Refreshes all the linked charts with the originating data. | Boolean, out string message | |
ReplaceText | Finds and replaces text. | string fromText, string toText, Int32 slideIndex, Int32 shapeIndex | Boolean, out string message |
RunMacro (1 parameter) | Runs a Visual Basic macro or calls a function. | string macroName | Object |
RunMacro (6 parameters) | Runs a Visual Basic macro or calls a function. All param1-param? parameters are optional. | string macroName, Object param1, Object param2, Object param3, Object param4, Object param5 | Object |
Save (no parameters) | Saves the currently opened presentation. | Void | |
Save (1 parameter) | Saves the currently opened presentation. Returns False and an error message if the operation fails. | Boolean, out string message | |
SaveAs (1 parameter) | Saves the currently opened presentation using the file name that you specify. | string fileName | Void |
SaveAs (2 parameters) | Saves the currently opened presentation using the file name that you specify. Returns False and an error message if the operation fails. | string fileName | Boolean, out string message |
SetActiveSlide | Sets the slide indicated in the Int32 index as the active slide. | Int32 index | Boolean, out string message |
SetSlideTransition | Sets the transition attributes of a slide. | Slide slide, PpEntryEffect entryEffect, PpTransitionSpeed speed, Single advanceTime, Boolean advanceOnTime, Boolean advanceOnClick | Boolean, out string message |
SetTextColor | Sets the color for the text in a shape. | Slide slide, Int32 shapeIndex, Color fontColor | Boolean, out string message |
SetTextFont | Specifies the font for the text in a shape. | Slide slide, Int32 shapeIndex, string fontName | Boolean, out string message |
SetTextSize | Sets the font size for the text in a shape. | Slide slide, Int32 shapeIndex, Single fontSize | Boolean, out string message |
SetTextStyle | Sets the style for the text in a shape. | Slide slide, Int32 shapeIndex, Boolean bold, Boolean italic, Boolean underline | Boolean, out string message |
ShapeCount | Returns the number of shapes in a slide. | Slide slide | Int32 |
Start | Starts the PowerPoint connector. | Void | |
StartSlideShow | Starts the slide show from the slide that you specify. | Int32 slideIndex | Boolean, out string message |
Stop | Stops the PowerPoint connector. | Void |
Events
Event | Description |
AfterNewPresentation | Occurs after a presentation is created. |
AfterPresentationOpen | Occurs after a presentation is opened. |
ColorSchemeChanged | Occurs after the color scheme is changed. |
NewPresentation | Occurs after a presentation is created, when it is added to the Presentations collection. |
PresentationBeforeClose | Represents a Presentation object before it closes. |
PresentationBeforeSave | Occurs before a presentation is saved. |
PresentationClose | Occurs immediately before any open presentation closes, when it is removed from the Presentations collection. |
PresentationCloseFinal | Represents the closing of the final Presentation object. |
PresentationNewSlide | Occurs after a slide is added to the presentation. |
PresentationOpen | Occurs after an existing presentation is opened, as it is added to the Presentations collection. |
PresentationPrint | Occurs before a presentation is printed. |
PresentationSave | Occurs before a presentation is saved. |
PresentationSync | Occurs when the local copy of a presentation that is part of a Document Workspace is synchronized with the copy on the server. |
ProtectedViewWindowActivate | Occurs when any protected view window is activated. |
ProtectedViewWindowBeforeClose | Occurs immediately before a protected view window or a document in a protected view window closes. |
ProtectedViewWindowBeforeEdit | Occurs immediately before editing is enabled on the document in the specified protected view window. |
ProtectedViewWindowDeactivate | Occurs when a protected view window is deactivated. |
ProtectedViewWindowOpen | Occurs when a protected view window is opened. |
SlideSelectionChanged | Occurs at different times depending on the current view. |
SlideShowBegin | Occurs when you start a slide show. |
SlideShowEnd | Occurs after a slide show ends, after the last SlideShowNextSlide event occurs. |
SlideShowNextBuild | Occurs upon a mouse-click or timing animation, but before the animated object becomes visible. |
SlideShowNextClick | Occurs on the next click of the slide. |
SlideShowNextSlide | Occurs immediately before the transition to the next slide. For the first slide, this event occurs immediately after the SlideShowBegin event. |
SlideShowOnNext | Occurs when the user clicks Next to move within the current slide. Occurs when the user clicks Next to move within the current slide. |
SlideShowOnPrevious | Occurs when the user clicks Previous to move within the current slide. |
WindowActivate | Occurs when the application window or any document window is activated. |
WindowBeforeDoubleClick | Occurs when you double-click a shape, a slide, a notes page, or text. This event is triggered by the MouseUp event. |
WindowBeforeRightClick | Occurs when you right-click a shape, a slide, a notes page, or text. This event is triggered by the MouseUp event. |
WindowDeactivate | Occurs when the application window or any document window is deactivated. |
WindowSelectionChange | Occurs when the selection of text, a shape, or a slide in the active document window changes, whether in the user interface or in the code. |
Previous topic MicrosoftOutlookTask connector Next topic MicrosoftWord connector