Share via


PowerPoint.Presentation class

Extends

注釈

[ API set: PowerPointApi 1.0 ]

プロパティ

context

オブジェクトに関連付けられている要求コンテキスト。 これにより、アドインのプロセスが Office ホスト アプリケーションのプロセスに接続されます。

slideMasters

プレゼンテーション内にあるオブジェクトの SlideMaster コレクションを返します。

slides

プレゼンテーション内のスライドの順序付きコレクションを返します。

tags

プレゼンテーションに添付されたタグのコレクションを返します。

title

メソッド

insertSlidesFromBase64(base64File, options)

プレゼンテーションから現在のプレゼンテーションに指定したスライドを挿入します。

load(options)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

load(propertyNames)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

load(propertyNamesAndPaths)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

toJSON()

API オブジェクトが に渡されたときにより便利な出力を提供するために、JavaScript toJSON() メソッドを JSON.stringify()オーバーライドします。 (JSON.stringifyさらに、渡される オブジェクトの メソッドを呼び出 toJSON します)。元の PowerPoint.Presentation オブジェクトは API オブジェクトですが、メソッドは、元の toJSON オブジェクトから読み込まれた子プロパティの浅いコピーを含むプレーンな JavaScript オブジェクト (として PowerPoint.Interfaces.PresentationData型指定) を返します。

プロパティの詳細

context

オブジェクトに関連付けられている要求コンテキスト。 これにより、アドインのプロセスが Office ホスト アプリケーションのプロセスに接続されます。

context: RequestContext;

プロパティ値

slideMasters

プレゼンテーション内にあるオブジェクトの SlideMaster コレクションを返します。

readonly slideMasters: PowerPoint.SlideMasterCollection;

プロパティ値

注釈

[ API セット: PowerPointApi 1.3 ]

slides

プレゼンテーション内のスライドの順序付きコレクションを返します。

readonly slides: PowerPoint.SlideCollection;

プロパティ値

注釈

[ API セット: PowerPointApi 1.2 ]

tags

プレゼンテーションに添付されたタグのコレクションを返します。

readonly tags: PowerPoint.TagCollection;

プロパティ値

注釈

[ API セット: PowerPointApi 1.3 ]

title

readonly title: string;

プロパティ値

string

メソッドの詳細

insertSlidesFromBase64(base64File, options)

プレゼンテーションから現在のプレゼンテーションに指定したスライドを挿入します。

insertSlidesFromBase64(base64File: string, options?: PowerPoint.InsertSlideOptions): void;

パラメーター

base64File

string

ソース プレゼンテーション ファイルを表す base64 でエンコードされた文字列。

options
PowerPoint.InsertSlideOptions

挿入するスライド、新しいスライドの配置場所、使用するプレゼンテーションの書式設定を定義するオプション。

戻り値

void

注釈

[ API セット: PowerPointApi 1.2 ]

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/slide-management/insert-slides.yaml

await PowerPoint.run(async function(context) {
    const selectedSlideID = await getSelectedSlideID();

    context.presentation.insertSlidesFromBase64(chosenFileBase64, {
        formatting: PowerPoint.InsertSlideFormatting.useDestinationTheme,
        targetSlideId: selectedSlideID + "#"
    });
    await context.sync();
});

load(options)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

load(options?: PowerPoint.Interfaces.PresentationLoadOptions): PowerPoint.Presentation;

パラメーター

options
PowerPoint.Interfaces.PresentationLoadOptions

読み込むオブジェクトのプロパティのオプションを提供します。

戻り値

load(propertyNames)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

load(propertyNames?: string | string[]): PowerPoint.Presentation;

パラメーター

propertyNames

string | string[]

読み込むプロパティを指定するコンマ区切り文字列または文字列の配列。

戻り値

load(propertyNamesAndPaths)

オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync() を呼び出す必要があります。

load(propertyNamesAndPaths?: {
            select?: string;
            expand?: string;
        }): PowerPoint.Presentation;

パラメーター

propertyNamesAndPaths

{ select?: string; expand?: string; }

propertyNamesAndPaths.select は、読み込むプロパティを指定するコンマ区切り文字列で propertyNamesAndPaths.expand 、読み込むナビゲーション プロパティを指定するコンマ区切りの文字列です。

戻り値

toJSON()

API オブジェクトが に渡されたときにより便利な出力を提供するために、JavaScript toJSON() メソッドを JSON.stringify()オーバーライドします。 (JSON.stringifyさらに、渡される オブジェクトの メソッドを呼び出 toJSON します)。元の PowerPoint.Presentation オブジェクトは API オブジェクトですが、メソッドは、元の toJSON オブジェクトから読み込まれた子プロパティの浅いコピーを含むプレーンな JavaScript オブジェクト (として PowerPoint.Interfaces.PresentationData型指定) を返します。

toJSON(): PowerPoint.Interfaces.PresentationData;

戻り値