IAdhocSlide.Duplicate

Syntax

Duplicate: IAdhocSlide;

Description

The Duplicate method duplicates a slide.

Example

Executing the example requires that the repository contains a dashboard with the DASHBOARD identifier and with at least three slides.

Add links to the Adhoc, Metabase system assemblies.

Sub UserProc;
Var
    MB: IMetabase;
    MObj: IMetabaseObject;
    Dashboard: IAdhocReport;
    Slides: IAdhocSlides;
    Slide: IAdhocSlide;
Begin
    // Get the current repository
    MB := MetabaseClass.Active;
    // Get dashboard
    MObj := MB.ItemById("DASHBOARD").Edit;
    Dashboard := MObj As IAdhocReport;
    // Get collection of slides
    Slides := Dashboard.Slides;
    // Duplicate the third slide
    Slide := Slides.Item(2);
    Slide.Duplicate;
    // Save changes
    MObj.Save;
End Sub UserProc;

After executing the example, a copy of the third slide is added to the dashboard.

See also:

IAdhocSlide