Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin
Description

Excerpt

Copies a slide in the presentation to another position in the same presentation.

Signature
C#
C#
 public void CopySheet(PowerPointWriter.Slide slide, int position)
Signature
vbnet
vbnet
Public Sub CopySheet(ByVal slide As PowerPointWriter.Slide, ByVal position As Integer)
Parameters
Param
slide
slide

A Slide object representing the slide to copy.

Param
position
position

The 0-based position at which to insert a copy of the specified slide. If position is less than 0, it is inserted before the first slide in the presentation. If position is equal to or greater than Slides.Count, it is inserted after the last slide.

Remarks

All of the settings, configuration, and values on the original slide will be both preserved on the original slide and copied to the new slide.

Slides cannot be copied between different presentations.

Example
Code Block
csharp
csharp
titleC#
//An example of copying slides within a presentation
PowerPointApplication ppta = new PowerPointApplication();
Presentation pres = ppta.Open("template.pptx");

//Copy a slide from the beginning of the presentation to the end of the presentation
Slide slideToCopy = pres.Slides[0];
pres.Slides.CopySlide(slideTocopy, (pres.Slides.Count));


Code Block
vbnet
vbnet
titlevb.net
'An example of copying slides within a presentation
Dim ppta As PowerPointApplication = new PowerPointApplication()
Dim pres As Presentation = ppta.Open("template.pptx")

'Copy a slide from the beginning of the presentation to the end of the presentation
Dim slideToCopy As Slide = pres.Slides(0)
pres.Slides.CopySlide(slideTocopy, (pres.Slides.Count))