powerpoint package

クラス

PowerPoint.Application
PowerPoint.BulletFormat

PowerPoint.ParagraphFormat に添付されているテキストの箇条書きの書式設定プロパティを表します

PowerPoint.ParagraphFormat

PowerPoint.TextRange に添付されているテキストの段落書式プロパティを表します

PowerPoint.Presentation
PowerPoint.RequestContext

RequestContext オブジェクトは、PowerPoint アプリケーションへの要求を容易にします。 Office アドインと PowerPoint アプリケーションは 2 つの異なるプロセスで実行されるため、アドインから PowerPoint オブジェクト モデルにアクセスするには要求コンテキストが必要です。

PowerPoint.Shape

スライド内の 1 つの図形を表します。

PowerPoint.ShapeCollection

図形のコレクションを表します。

PowerPoint.ShapeFill

図形オブジェクトの塗りつぶしの書式設定を表します。

PowerPoint.ShapeFont

図形の TextRange オブジェクトのフォント名、フォント サイズ、色などのフォント属性を表します。

PowerPoint.ShapeLineFormat

図形オブジェクトの線の書式を表します。 画像と幾何学的図形の場合、線の書式設定は図形の境界線を表します。

PowerPoint.ShapeScopedCollection

図形のコレクションを表します。

PowerPoint.Slide

プレゼンテーションの 1 つのスライドを表します。

PowerPoint.SlideCollection

プレゼンテーション内のスライドのコレクションを表します。

PowerPoint.SlideLayout

スライドのレイアウトを表します。

PowerPoint.SlideLayoutCollection

スライドのスライド マスターによって提供されるレイアウトのコレクションを表します。

PowerPoint.SlideMaster

スライドのスライド マスターを表します。

PowerPoint.SlideMasterCollection

プレゼンテーション内のスライド マスターのコレクションを表します。

PowerPoint.SlideScopedCollection

プレゼンテーション内のスライドのコレクションを表します。

PowerPoint.Tag

スライド内の 1 つのタグを表します。

PowerPoint.TagCollection

タグのコレクションを表します。

PowerPoint.TextFrame

図形オブジェクトのテキスト フレームを表します。

PowerPoint.TextRange

図形に結合するテキストや、テキストを操作するためのプロパティおよびメソッドが含まれます。

インターフェイス

PowerPoint.AddSlideOptions

新しいスライドを追加するときに使用できるオプションを表します。

PowerPoint.InsertSlideOptions

スライドを挿入するときに使用できるオプションを表します。

PowerPoint.Interfaces.BulletFormatData

を呼び出 bulletFormat.toJSON()して返されるデータを記述するインターフェイス。

PowerPoint.Interfaces.BulletFormatLoadOptions

PowerPoint.ParagraphFormat に添付されているテキストの箇条書きの書式設定プロパティを表します

PowerPoint.Interfaces.BulletFormatUpdateData

で使用 bulletFormat.set({ ... })する BulletFormat オブジェクトのデータを更新するためのインターフェイス。

PowerPoint.Interfaces.CollectionLoadOptions

コレクションのメンバーのサブセットのみのプロパティを読み込む方法を提供します。

PowerPoint.Interfaces.ParagraphFormatData

を呼び出 paragraphFormat.toJSON()して返されるデータを記述するインターフェイス。

PowerPoint.Interfaces.ParagraphFormatLoadOptions

PowerPoint.TextRange に添付されているテキストの段落書式プロパティを表します

PowerPoint.Interfaces.ParagraphFormatUpdateData

で使用 paragraphFormat.set({ ... })する ParagraphFormat オブジェクトのデータを更新するためのインターフェイス。

PowerPoint.Interfaces.PresentationData

を呼び出 presentation.toJSON()して返されるデータを記述するインターフェイス。

PowerPoint.Interfaces.PresentationLoadOptions
PowerPoint.Interfaces.ShapeCollectionData

を呼び出 shapeCollection.toJSON()して返されるデータを記述するインターフェイス。

PowerPoint.Interfaces.ShapeCollectionLoadOptions

図形のコレクションを表します。

PowerPoint.Interfaces.ShapeCollectionUpdateData

で使用 shapeCollection.set({ ... })する ShapeCollection オブジェクトのデータを更新するためのインターフェイス。

PowerPoint.Interfaces.ShapeData

を呼び出 shape.toJSON()して返されるデータを記述するインターフェイス。

PowerPoint.Interfaces.ShapeFillData

を呼び出 shapeFill.toJSON()して返されるデータを記述するインターフェイス。

PowerPoint.Interfaces.ShapeFillLoadOptions

図形オブジェクトの塗りつぶしの書式設定を表します。

PowerPoint.Interfaces.ShapeFillUpdateData

で使用 shapeFill.set({ ... })する ShapeFill オブジェクトのデータを更新するためのインターフェイス。

PowerPoint.Interfaces.ShapeFontData

を呼び出 shapeFont.toJSON()して返されるデータを記述するインターフェイス。

PowerPoint.Interfaces.ShapeFontLoadOptions

図形の TextRange オブジェクトのフォント名、フォント サイズ、色などのフォント属性を表します。

PowerPoint.Interfaces.ShapeFontUpdateData

で使用 shapeFont.set({ ... })する ShapeFont オブジェクトのデータを更新するためのインターフェイス。

PowerPoint.Interfaces.ShapeLineFormatData

を呼び出 shapeLineFormat.toJSON()して返されるデータを記述するインターフェイス。

PowerPoint.Interfaces.ShapeLineFormatLoadOptions

図形オブジェクトの線の書式を表します。 画像と幾何学的図形の場合、線の書式設定は図形の境界線を表します。

PowerPoint.Interfaces.ShapeLineFormatUpdateData

で使用 shapeLineFormat.set({ ... })する ShapeLineFormat オブジェクトのデータを更新するためのインターフェイス。

PowerPoint.Interfaces.ShapeLoadOptions

スライド内の 1 つの図形を表します。

PowerPoint.Interfaces.ShapeScopedCollectionData

を呼び出 shapeScopedCollection.toJSON()して返されるデータを記述するインターフェイス。

PowerPoint.Interfaces.ShapeScopedCollectionLoadOptions

図形のコレクションを表します。

PowerPoint.Interfaces.ShapeScopedCollectionUpdateData

で使用 shapeScopedCollection.set({ ... })する ShapeScopedCollection オブジェクトのデータを更新するためのインターフェイス。

PowerPoint.Interfaces.ShapeUpdateData

で使用 shape.set({ ... })する Shape オブジェクトのデータを更新するためのインターフェイス。

PowerPoint.Interfaces.SlideCollectionData

を呼び出 slideCollection.toJSON()して返されるデータを記述するインターフェイス。

PowerPoint.Interfaces.SlideCollectionLoadOptions

プレゼンテーション内のスライドのコレクションを表します。

PowerPoint.Interfaces.SlideCollectionUpdateData

で使用 slideCollection.set({ ... })する SlideCollection オブジェクトのデータを更新するためのインターフェイス。

PowerPoint.Interfaces.SlideData

を呼び出 slide.toJSON()して返されるデータを記述するインターフェイス。

PowerPoint.Interfaces.SlideLayoutCollectionData

を呼び出 slideLayoutCollection.toJSON()して返されるデータを記述するインターフェイス。

PowerPoint.Interfaces.SlideLayoutCollectionLoadOptions

スライドのスライド マスターによって提供されるレイアウトのコレクションを表します。

PowerPoint.Interfaces.SlideLayoutCollectionUpdateData

で使用 slideLayoutCollection.set({ ... })する SlideLayoutCollection オブジェクトのデータを更新するためのインターフェイス。

PowerPoint.Interfaces.SlideLayoutData

を呼び出 slideLayout.toJSON()して返されるデータを記述するインターフェイス。

PowerPoint.Interfaces.SlideLayoutLoadOptions

スライドのレイアウトを表します。

PowerPoint.Interfaces.SlideLoadOptions

プレゼンテーションの 1 つのスライドを表します。

PowerPoint.Interfaces.SlideMasterCollectionData

を呼び出 slideMasterCollection.toJSON()して返されるデータを記述するインターフェイス。

PowerPoint.Interfaces.SlideMasterCollectionLoadOptions

プレゼンテーション内のスライド マスターのコレクションを表します。

PowerPoint.Interfaces.SlideMasterCollectionUpdateData

で使用 slideMasterCollection.set({ ... })する SlideMasterCollection オブジェクトのデータを更新するためのインターフェイス。

PowerPoint.Interfaces.SlideMasterData

を呼び出 slideMaster.toJSON()して返されるデータを記述するインターフェイス。

PowerPoint.Interfaces.SlideMasterLoadOptions

スライドのスライド マスターを表します。

PowerPoint.Interfaces.SlideScopedCollectionData

を呼び出 slideScopedCollection.toJSON()して返されるデータを記述するインターフェイス。

PowerPoint.Interfaces.SlideScopedCollectionLoadOptions

プレゼンテーション内のスライドのコレクションを表します。

PowerPoint.Interfaces.SlideScopedCollectionUpdateData

で使用 slideScopedCollection.set({ ... })する SlideScopedCollection オブジェクトのデータを更新するためのインターフェイス。

PowerPoint.Interfaces.TagCollectionData

を呼び出 tagCollection.toJSON()して返されるデータを記述するインターフェイス。

PowerPoint.Interfaces.TagCollectionLoadOptions

タグのコレクションを表します。

PowerPoint.Interfaces.TagCollectionUpdateData

で使用 tagCollection.set({ ... })する TagCollection オブジェクトのデータを更新するためのインターフェイス。

PowerPoint.Interfaces.TagData

を呼び出 tag.toJSON()して返されるデータを記述するインターフェイス。

PowerPoint.Interfaces.TagLoadOptions

スライド内の 1 つのタグを表します。

PowerPoint.Interfaces.TagUpdateData

で使用 tag.set({ ... })する Tag オブジェクトのデータを更新するためのインターフェイス。

PowerPoint.Interfaces.TextFrameData

を呼び出 textFrame.toJSON()して返されるデータを記述するインターフェイス。

PowerPoint.Interfaces.TextFrameLoadOptions

図形オブジェクトのテキスト フレームを表します。

PowerPoint.Interfaces.TextFrameUpdateData

で使用 textFrame.set({ ... })する TextFrame オブジェクトのデータを更新するためのインターフェイス。

PowerPoint.Interfaces.TextRangeData

を呼び出 textRange.toJSON()して返されるデータを記述するインターフェイス。

PowerPoint.Interfaces.TextRangeLoadOptions

図形に結合するテキストや、テキストを操作するためのプロパティおよびメソッドが含まれます。

PowerPoint.Interfaces.TextRangeUpdateData

で使用 textRange.set({ ... })する TextRange オブジェクトのデータを更新するためのインターフェイス。

PowerPoint.ShapeAddOptions

図形を追加するときに使用できるオプションを表します。

PowerPoint.SlideGetImageOptions

スライドの画像を取得するときに使用できるオプションを表します。

列挙型

PowerPoint.ConnectorType

線の図形のコネクタの種類を指定します。

PowerPoint.ErrorCodes
PowerPoint.GeometricShapeType

オブジェクトの図形の種類を GeometricShape 指定します。

PowerPoint.InsertSlideFormatting

スライドを挿入するときの書式設定オプションを指定します。

PowerPoint.ParagraphHorizontalAlignment

PowerPoint.Shape の PowerPoint.TextFrame の水平方向の配置を表します

PowerPoint.ShapeAutoSize

許可される自動サイズ変更を決定します。

PowerPoint.ShapeFillType

図形の塗りつぶしの種類を指定します。

PowerPoint.ShapeFontUnderlineStyle

フォントに適用される下線の種類。

PowerPoint.ShapeLineDashStyle

線の実線/点線のスタイルを指定します。

PowerPoint.ShapeLineStyle

線のスタイルを指定します。

PowerPoint.ShapeType

図形の種類を指定します。

PowerPoint.TextVerticalAlignment

PowerPoint.Shape の PowerPoint.TextFrame の垂直方向の配置を表します。 中央揃えのオプションが 1 つ選択されている場合、 の TextFrame 内容は、 グループ内 Shape で水平方向に中央揃えされます。 テキストの水平方向の配置を変更するには、「 PowerPoint.ParagraphFormat」 および 「PowerPoint.ParagraphHorizontalAlignment」を参照してください。

機能

PowerPoint.createPresentation(base64File)

新しいプレゼンテーションを作成して開きます。 必要に応じて、プレゼンテーションに base64 でエンコードされた .pptx ファイルを事前に設定できます。

[ API set: PowerPointApi 1.1 ]

PowerPoint.run(batch)

新しい RequestContext を使用して、PowerPoint オブジェクト モデルに対してアクションを実行するバッチ スクリプトを実行します。 promise が解決されると、実行中に自動的に割り当てられた追跡対象オブジェクトが解放されます。

PowerPoint.run(object, batch)

以前に作成した API オブジェクトの RequestContext を使用して、PowerPoint オブジェクト モデルに対してアクションを実行するバッチ スクリプトを実行します。 promise が解決されると、実行中に自動的に割り当てられた追跡対象オブジェクトが解放されます。

PowerPoint.run(objects, batch)

以前に作成した API オブジェクトの RequestContext を使用して、PowerPoint オブジェクト モデルに対してアクションを実行するバッチ スクリプトを実行します。

関数の詳細

PowerPoint.createPresentation(base64File)

新しいプレゼンテーションを作成して開きます。 必要に応じて、プレゼンテーションに base64 でエンコードされた .pptx ファイルを事前に設定できます。

[ API set: PowerPointApi 1.1 ]

export function createPresentation(base64File?: string): Promise<void>;

パラメーター

base64File

string

省略可能です。 base64 でエンコードされた .pptx ファイル。 既定値は null です。

戻り値

Promise<void>

const myFile = <HTMLInputElement>document.getElementById("file");
const reader = new FileReader();

reader.onload = (event) => {
  // Remove the metadata before the base64-encoded string.
  const startIndex = reader.result.toString().indexOf("base64,");
  const copyBase64 = reader.result.toString().substr(startIndex + 7);

  PowerPoint.createPresentation(copyBase64);
};

// Read in the file as a data URL so we can parse the base64-encoded string.
reader.readAsDataURL(myFile.files[0]);

PowerPoint.run(batch)

新しい RequestContext を使用して、PowerPoint オブジェクト モデルに対してアクションを実行するバッチ スクリプトを実行します。 promise が解決されると、実行中に自動的に割り当てられた追跡対象オブジェクトが解放されます。

export function run<T>(batch: (context: PowerPoint.RequestContext) => OfficeExtension.IPromise<T>): OfficeExtension.IPromise<T>;

パラメーター

batch

(context: PowerPoint.RequestContext) => OfficeExtension.IPromise<T>

RequestContext を受け取り、promise を返す関数 (通常は "context.sync()" の結果のみ)。 context パラメーターを使用すると、PowerPoint アプリケーションへの要求が容易になります。 Office アドインと PowerPoint アプリケーションは 2 つの異なるプロセスで実行されるため、アドインから PowerPoint オブジェクト モデルにアクセスするには RequestContext が必要です。

戻り値

PowerPoint.run(object, batch)

以前に作成した API オブジェクトの RequestContext を使用して、PowerPoint オブジェクト モデルに対してアクションを実行するバッチ スクリプトを実行します。 promise が解決されると、実行中に自動的に割り当てられた追跡対象オブジェクトが解放されます。

export function run<T>(object: OfficeExtension.ClientObject, batch: (context: PowerPoint.RequestContext) => OfficeExtension.IPromise<T>): OfficeExtension.IPromise<T>;

パラメーター

object
OfficeExtension.ClientObject

以前に作成した API オブジェクト。 バッチでは、渡されたオブジェクトと同じ RequestContext が使用されます。つまり、オブジェクトに適用された変更はすべて "context.sync()" によって取得されます。

batch

(context: PowerPoint.RequestContext) => OfficeExtension.IPromise<T>

RequestContext を受け取り、promise を返す関数 (通常は "context.sync()" の結果のみ)。 context パラメーターを使用すると、PowerPoint アプリケーションへの要求が容易になります。 Office アドインと PowerPoint アプリケーションは 2 つの異なるプロセスで実行されるため、アドインから PowerPoint オブジェクト モデルにアクセスするには RequestContext が必要です。

戻り値

PowerPoint.run(objects, batch)

以前に作成した API オブジェクトの RequestContext を使用して、PowerPoint オブジェクト モデルに対してアクションを実行するバッチ スクリプトを実行します。

export function run<T>(objects: OfficeExtension.ClientObject[], batch: (context: PowerPoint.RequestContext) => OfficeExtension.IPromise<T>): OfficeExtension.IPromise<T>;

パラメーター

objects

OfficeExtension.ClientObject[]

以前に作成した API オブジェクトの配列。 配列は、すべてのオブジェクトが同じコンテキストを共有することを確認するために検証されます。 バッチでは、この共有 RequestContext が使用されます。これは、これらのオブジェクトに適用された変更が "context.sync()" によって取得されることを意味します。

batch

(context: PowerPoint.RequestContext) => OfficeExtension.IPromise<T>

RequestContext を受け取り、promise を返す関数 (通常は "context.sync()" の結果のみ)。 context パラメーターを使用すると、PowerPoint アプリケーションへの要求が容易になります。 Office アドインと PowerPoint アプリケーションは 2 つの異なるプロセスで実行されるため、アドインから PowerPoint オブジェクト モデルにアクセスするには RequestContext が必要です。

戻り値