insert_clone method

insert_clone

Inserts a copy of a specified slide to specified position of the collection.

Returns

Inserted slide.

def insert_clone(self, index, source_slide):
    ...
ParameterTypeDescription
indexintIndex of new slide.
source_slideISlideSlide to clone.

Examples

The following example shows how to clone at another position within Presentation.

        The following example shows how to clone at another position within Presentation.

Remarks

When cloning a slide between different presentations slide’s master can be cloned too. Internal registry is used to track automatically cloned masters to prevent creation of multiple clones of the same master slide. Manual cloning of master slides will be neither prevented nor registered. If you need more control over cloning process use SlideCollection.insert_clone or SlideCollection.insert_clone for cloning slides and IMasterSlideCollection.add_clone for cloning masters.

insert_clone

Inserts a copy of a specified slide to specified position of the collection.

Returns

Inserted slide.

def insert_clone(self, index, source_slide, dest_layout):
    ...
ParameterTypeDescription
indexintIndex of new slide.
source_slideISlideSlide to clone.
dest_layoutILayoutSlideLayout slide for a new slide.

insert_clone

Inserts a copy of a specified source slide to specified position of the collection. Appropriate layout will be selected automatically from the specified master (appropriate layout is the layout with the same Type or Name as of layout of the source slide). If there is no appropriate layout then layout of the source slide will be cloned (if allowCloneMissingLayout is true) or PptxEditException will be thrown (if allowCloneMissingLayout is false).

Returns

Inserted slide.

def insert_clone(self, index, source_slide, dest_master, allow_clone_missing_layout):
    ...
ParameterTypeDescription
indexintIndex of new slide.
source_slideISlideSlide to clone.
dest_masterIMasterSlideMaster slide for a new slide.
allow_clone_missing_layoutboolIf there is no appropriate layout in specified master then layout of the

source slide will be cloned (if allowCloneMissingLayout is true) or

PptxEditException will be thrown (if allowCloneMissingLayout is false).

Exceptions

ExceptionDescription
PptxEditExceptionThrown if there is no appropriate layout in specified master and
allowCloneMissingLayout is false.

See Also