Edit

Office.Slide interface

Represents a single slide in a PowerPoint presentation. This interface is used as part of the Office.SlideRange object returned by Office.Document.getSelectedDataAsync when called with Office.CoercionType.SlideRange.

Remarks

Used by

Examples

// Get the currently selected slides in a PowerPoint presentation.
Office.context.document.getSelectedDataAsync(Office.CoercionType.SlideRange, (asyncResult) => {
    if (asyncResult.status === Office.AsyncResultStatus.Succeeded) {
        const slideRange: Office.SlideRange = asyncResult.value;
        console.log(`Selected ${slideRange.slides.length} slide(s)`);
        slideRange.slides.forEach(slide => {
            // Access the properties of each selected Office.Slide.
            console.log(`Slide ${slide.index}: ${slide.title} (ID: ${slide.id})`);
        });
    }
    else {
        console.error(asyncResult.error.message);
    }
});

Properties

id

Gets the unique ID of the slide.

index

Gets the 1-based index of the slide within the presentation.

title

Gets the title of the slide.

Property Details

id

Gets the unique ID of the slide.

id: number;

Property Value

number

index

Gets the 1-based index of the slide within the presentation.

index: number;

Property Value

number

title

Gets the title of the slide.

title: string;

Property Value

string