Excerpt |
---|
Copies a slide in the presentation to another position in the same presentation. |
Signature |
---|
C# | C# | Wiki Markup |
---|
{description}
{excerpt}Copies a slide in the presentation to another position in the same presentation.{excerpt}
{signature:C#}
public void CopySheet(PowerPointWriter.Slide slide, int position)
|
Signature |
---|
vbnet | vbnet | {signature}{signature:vbnet}
Public Sub CopySheet(ByVal slide As PowerPointWriter.Slide, ByVal position As Integer)
|
...
A Slide object representing the slide to copy.
...
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 |
title | C# |
---|
{signature}
{parameters}
{param:slide}A [Slide|Slide] object representing the slide to copy.{param}
{param: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|Slides.Count], it is inserted after the last slide.{param}
{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.
{remarks}
{example}{code:csharp|title=C#}
//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 | title | {code}
{code:vbnet|title=vb.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))
{code}
{example}