Presentation class

Presentation class

Represents a Microsoft PowerPoint presentation.

The Presentation type exposes the following members:

Constructors

ConstructorDescription
__init__(self)This constructor creates new presentation from scratch.
Created presentation has one empty slide.
__init__(self, load_options)This constructor creates new presentation from scratch.
Created presentation has one empty slide.
__init__(self, stream)This constructor is the primary mechanism for reading an existing Presentation.
__init__(self, stream, load_options)This constructor is the primary mechanism for reading an existing Presentation.
__init__(self, file)This constructor gets a source file path from which
the contents of the Presentation are read.
__init__(self, file, load_options)This constructor gets a source file path from which
the contents of the Presentation are read.

Properties

PropertyDescription
current_date_timeReturns or sets date and time which will substitute content of datetime fields.
Time of this Presentation object creation by default.
Read/write System.DateTime.
header_footer_managerReturns actual HeaderFooter manager.
Read-only IPresentationHeaderFooterManager.
protection_managerGets manager of the permissions for this presentation.
Read-only IProtectionManager.
slidesReturns a list of all slides that are defined in the presentation.
Read-only ISlideCollection.
sectionsReturns a list of all slides sections that are defined in the presentation.
Read-only ISectionCollection.
slide_sizeReturns slide size object.
Read-only ISlideSize.
notes_sizeReturns notes slide size object.
Read-only INotesSize.
layout_slidesReturns a list of all layout slides that are defined in the presentation.
Read-only IGlobalLayoutSlideCollection.
mastersReturns a list of all master slides that are defined in the presentation.
Read-only IMasterSlideCollection.
master_notes_slide_managerReturns notes master manager.
Read-only IMasterNotesSlideManager.
master_handout_slide_managerReturns handout master manager.
Read-only IMasterHandoutSlideManager.
fonts_managerReturns fonts manager.
Read-only IFontsManager.
default_text_styleReturns default text style for shapes.
Read-only ITextStyle.
comment_authorsReturns the collection of comments autors.
Read-only ICommentAuthorCollection.
document_propertiesReturns DocumentProperties object which contains standard and custom document properties.
Read-only IDocumentProperties.
imagesReturns the collection of all images in the presentation.
Read-only IImageCollection.
audiosReturns the collection of all embedded audio files in the presentation.
Read-only IAudioCollection.
videosReturns the collection of all embedded video files in the presentation.
Read-only IVideoCollection.
slide_show_settingsReturns the slide show settings for the presentation.
digital_signaturesReturns the collection of signatures used to sign the presentation.
Read-only IDigitalSignatureCollection.
custom_dataReturns the presentation’s custom data.
Read-only ICustomData.
all_custom_xml_partsReturns all custom data parts in the presentaion.
Read-only ICustomXmlPart[].
vba_projectGets or sets VBA project with presentation macros.
Read/write IVbaProject.
hyperlink_queriesProvides easy access to all hyperlinks contained in all presentation slides (not in master, layout, notes slides).
Read-only IHyperlinkQueries.
view_propertiesGets presentation wide view properties.
Read-only IViewProperties.
first_slide_numberRepresents the first slide number in the presentation
sensitivity_labelsReturns the collection of sensitivity labels applied to the presentation document.
Read-only ISensitivityLabelCollection.
source_formatReturns information about from which format presentation was loaded.
Read-only SourceFormat.
master_themeReturns master theme.
Read-only IMasterTheme.
presentation

Methods

MethodDescription
save(self, fname, format)Saves all slides of a presentation to a file with the specified format.
save(self, stream, format)Saves all slides of a presentation to a stream in the specified format.
save(self, fname, format, options)
save(self, stream, format, options)Saves all slides of a presentation to a stream in the specified format and with additional options.
save(self, options)Saves all slides of a presentation to a set of files representing XAML markup.
save(self, fname, slides, format)Saves specified slides of a presentation to a file with the specified format with page number keeping.
save(self, fname, slides, format, options)Saves specified slides of a presentation to a file with the specified format with page number keeping.
save(self, stream, slides, format)Saves specified slides of a presentation to a stream in the specified format with page number keeping.
save(self, stream, slides, format, options)Saves specified slides of a presentation to a stream in the specified format with page number keeping.
get_images(self, options)Returns a Image objects for all slides of a presentation.
get_images(self, options, slides)Returns a Thumbnail Image objects for specified slides of a presentation.
get_images(self, options, scale_x, scale_y)Returns a Thumbnail Image objects for all slides of a presentation with custom scaling.
get_images(self, options, slides, scale_x, scale_y)Returns a Thumbnail Image objects for specified slides of a presentation with custom scaling.
get_images(self, options, image_size)Returns a Thumbnail Image objects for all slides of a presentation with specified size.
get_images(self, options, slides, image_size)Returns a Thumbnail Image objects for specified slides of a presentation with specified size.
highlight_text(self, text, highlight_color)Highlights all matches of the sample text with the specified color.
highlight_text(self, text, highlight_color, options, callback)Highlights all matches of the sample text with the specified color.
get_slide_by_id(self, id)Returns a Slide, MasterSlide or LayoutSlide by Id.
join_portions_with_same_formatting(self)Joins runs with same formatting in all paragraphs in all acceptable shapes in all slides.
highlight_regex(self, regex, highlight_color)Highlights all matches of the regular expression with the specified color.
replace_text(self, old_text, new_text, options, callback)Replaces all occurrences of the specified text with another specified text.
replace_regex(self, regex, new_text)Replaces all matches of the regular expression with the specified string.

See Also