PowerPoint.Presentation class
- Extends
注釈
[ API set: PowerPointApi 1.0 ]
プロパティ
context | オブジェクトに関連付けられている要求コンテキスト。 これにより、アドインのプロセスが Office ホスト アプリケーションのプロセスに接続されます。 |
slide |
プレゼンテーション内にあるオブジェクトの |
slides | プレゼンテーション内のスライドの順序付きコレクションを返します。 |
tags | プレゼンテーションに添付されたタグのコレクションを返します。 |
title |
メソッド
insert |
プレゼンテーションから現在のプレゼンテーションに指定したスライドを挿入します。 |
load(options) | オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、 |
load(property |
オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、 |
load(property |
オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、 |
toJSON() | API オブジェクトが に渡されたときにより便利な出力を提供するために、JavaScript |
プロパティの詳細
context
オブジェクトに関連付けられている要求コンテキスト。 これにより、アドインのプロセスが Office ホスト アプリケーションのプロセスに接続されます。
context: RequestContext;
プロパティ値
slideMasters
プレゼンテーション内にあるオブジェクトの SlideMaster
コレクションを返します。
readonly slideMasters: PowerPoint.SlideMasterCollection;
プロパティ値
注釈
slides
プレゼンテーション内のスライドの順序付きコレクションを返します。
readonly slides: PowerPoint.SlideCollection;
プロパティ値
注釈
tags
プレゼンテーションに添付されたタグのコレクションを返します。
readonly tags: PowerPoint.TagCollection;
プロパティ値
注釈
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) {
// Get the ID of the first selected slide.
const presentation = context.presentation;
const selected = presentation.getSelectedSlides().getItemAt(0);
selected.load("id");
await context.sync();
// Insert the other presentation after the selected slide.
const insertOptions: PowerPoint.InsertSlideOptions = {
formatting: PowerPoint.InsertSlideFormatting.useDestinationTheme,
targetSlideId: selected.id
};
presentation.insertSlidesFromBase64(chosenFileBase64, insertOptions);
await context.sync();
});
load(options)
オブジェクトの指定されたプロパティを読み込むコマンドを待ち行列に入れます。 プロパティを読み取る前に、context.sync()
を呼び出す必要があります。
load(options?: PowerPoint.Interfaces.PresentationLoadOptions): PowerPoint.Presentation;
パラメーター
読み込むオブジェクトのプロパティのオプションを提供します。
戻り値
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;
戻り値
Office Add-ins
フィードバック
https://aka.ms/ContentUserFeedback」を参照してください。
以下は間もなく提供いたします。2024 年を通じて、コンテンツのフィードバック メカニズムとして GitHub の issue を段階的に廃止し、新しいフィードバック システムに置き換えます。 詳細については、「フィードバックの送信と表示