Office.Slide interface
PowerPoint プレゼンテーションの 1 枚のスライドを表します。 このインターフェイスは、Office.CoercionType.SlideRange で呼び出されたときに Office.Document.getSelectedDataAsync によって返される Office.SlideRange オブジェクトの一部として使用されます。
注釈
使用元
例
// 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);
}
});
プロパティの詳細
id
スライドの一意の ID を取得します。
id: number;
プロパティ値
number
index
プレゼンテーション内のスライドの 1 から始まるインデックスを取得します。
index: number;
プロパティ値
number
title
スライドのタイトルを取得します。
title: string;
プロパティ値
string