powerpoint package

クラス

PowerPoint.Application

プレゼンテーションを管理する PowerPoint アプリケーションを表します。

PowerPoint.Presentation

Presentation オブジェクトは、プレゼンテーションの内容を含む 1 枚以上のスライドを持つ最上位のオブジェクトです。 PowerPoint オブジェクト モデルの詳細については、「 JavaScript オブジェクト モデルPowerPoint」を参照してください。

PowerPoint.RequestContext

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

PowerPoint.Slide

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

PowerPoint.SlideCollection

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

インターフェイス

PowerPoint.InsertSlideOptions

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

PowerPoint.Interfaces.AdjustmentsData

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

PowerPoint.Interfaces.BindingCollectionData

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

PowerPoint.Interfaces.BindingCollectionUpdateData

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

PowerPoint.Interfaces.BindingData

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

PowerPoint.Interfaces.BorderData

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

PowerPoint.Interfaces.BordersData

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

PowerPoint.Interfaces.BorderUpdateData

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

PowerPoint.Interfaces.BulletFormatData

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

PowerPoint.Interfaces.BulletFormatUpdateData

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

PowerPoint.Interfaces.CollectionLoadOptions

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

PowerPoint.Interfaces.CustomPropertyCollectionData

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

PowerPoint.Interfaces.CustomPropertyCollectionUpdateData

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

PowerPoint.Interfaces.CustomPropertyData

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

PowerPoint.Interfaces.CustomPropertyUpdateData

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

PowerPoint.Interfaces.CustomXmlPartCollectionData

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

PowerPoint.Interfaces.CustomXmlPartCollectionUpdateData

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

PowerPoint.Interfaces.CustomXmlPartData

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

PowerPoint.Interfaces.CustomXmlPartScopedCollectionData

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

PowerPoint.Interfaces.CustomXmlPartScopedCollectionUpdateData

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

PowerPoint.Interfaces.DocumentPropertiesData

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

PowerPoint.Interfaces.DocumentPropertiesUpdateData

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

PowerPoint.Interfaces.HyperlinkCollectionData

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

PowerPoint.Interfaces.HyperlinkCollectionUpdateData

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

PowerPoint.Interfaces.HyperlinkData

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

PowerPoint.Interfaces.HyperlinkScopedCollectionData

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

PowerPoint.Interfaces.HyperlinkScopedCollectionUpdateData

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

PowerPoint.Interfaces.HyperlinkUpdateData

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

PowerPoint.Interfaces.MarginsData

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

PowerPoint.Interfaces.MarginsUpdateData

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

PowerPoint.Interfaces.PageSetupData

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

PowerPoint.Interfaces.PageSetupUpdateData

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

PowerPoint.Interfaces.ParagraphFormatData

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

PowerPoint.Interfaces.ParagraphFormatUpdateData

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

PowerPoint.Interfaces.PlaceholderFormatData

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

PowerPoint.Interfaces.PresentationData

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

PowerPoint.Interfaces.PresentationLoadOptions

Presentation オブジェクトは、プレゼンテーションの内容を含む 1 枚以上のスライドを持つ最上位のオブジェクトです。 PowerPoint オブジェクト モデルの詳細については、「 JavaScript オブジェクト モデルPowerPoint」を参照してください。

PowerPoint.Interfaces.ShapeCollectionData

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

PowerPoint.Interfaces.ShapeCollectionUpdateData

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

PowerPoint.Interfaces.ShapeData

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

PowerPoint.Interfaces.ShapeFillData

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

PowerPoint.Interfaces.ShapeFillUpdateData

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

PowerPoint.Interfaces.ShapeFontData

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

PowerPoint.Interfaces.ShapeFontUpdateData

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

PowerPoint.Interfaces.ShapeGroupData

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

PowerPoint.Interfaces.ShapeLineFormatData

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

PowerPoint.Interfaces.ShapeLineFormatUpdateData

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

PowerPoint.Interfaces.ShapeScopedCollectionData

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

PowerPoint.Interfaces.ShapeScopedCollectionUpdateData

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

PowerPoint.Interfaces.ShapeUpdateData

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

PowerPoint.Interfaces.SlideBackgroundData

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

PowerPoint.Interfaces.SlideBackgroundFillData

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

PowerPoint.Interfaces.SlideBackgroundGradientFillData

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

PowerPoint.Interfaces.SlideBackgroundGradientFillUpdateData

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

PowerPoint.Interfaces.SlideBackgroundPatternFillData

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

PowerPoint.Interfaces.SlideBackgroundPatternFillUpdateData

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

PowerPoint.Interfaces.SlideBackgroundPictureOrTextureFillData

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

PowerPoint.Interfaces.SlideBackgroundPictureOrTextureFillUpdateData

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

PowerPoint.Interfaces.SlideBackgroundSolidFillData

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

PowerPoint.Interfaces.SlideBackgroundSolidFillUpdateData

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

PowerPoint.Interfaces.SlideBackgroundUpdateData

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

PowerPoint.Interfaces.SlideCollectionData

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

PowerPoint.Interfaces.SlideCollectionLoadOptions

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

PowerPoint.Interfaces.SlideCollectionUpdateData

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

PowerPoint.Interfaces.SlideData

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

PowerPoint.Interfaces.SlideLayoutBackgroundData

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

PowerPoint.Interfaces.SlideLayoutBackgroundUpdateData

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

PowerPoint.Interfaces.SlideLayoutCollectionData

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

PowerPoint.Interfaces.SlideLayoutCollectionUpdateData

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

PowerPoint.Interfaces.SlideLayoutData

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

PowerPoint.Interfaces.SlideLoadOptions

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

PowerPoint.Interfaces.SlideMasterBackgroundData

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

PowerPoint.Interfaces.SlideMasterCollectionData

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

PowerPoint.Interfaces.SlideMasterCollectionUpdateData

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

PowerPoint.Interfaces.SlideMasterData

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

PowerPoint.Interfaces.SlideScopedCollectionData

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

PowerPoint.Interfaces.SlideScopedCollectionUpdateData

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

PowerPoint.Interfaces.TableCellCollectionData

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

PowerPoint.Interfaces.TableCellCollectionUpdateData

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

PowerPoint.Interfaces.TableCellData

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

PowerPoint.Interfaces.TableCellUpdateData

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

PowerPoint.Interfaces.TableColumnCollectionData

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

PowerPoint.Interfaces.TableColumnCollectionUpdateData

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

PowerPoint.Interfaces.TableColumnData

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

PowerPoint.Interfaces.TableColumnUpdateData

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

PowerPoint.Interfaces.TableData

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

PowerPoint.Interfaces.TableRowCollectionData

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

PowerPoint.Interfaces.TableRowCollectionUpdateData

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

PowerPoint.Interfaces.TableRowData

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

PowerPoint.Interfaces.TableRowUpdateData

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

PowerPoint.Interfaces.TableStyleSettingsData

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

PowerPoint.Interfaces.TableStyleSettingsUpdateData

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

PowerPoint.Interfaces.TagCollectionData

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

PowerPoint.Interfaces.TagCollectionUpdateData

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

PowerPoint.Interfaces.TagData

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

PowerPoint.Interfaces.TagUpdateData

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

PowerPoint.Interfaces.TextFrameData

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

PowerPoint.Interfaces.TextFrameUpdateData

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

PowerPoint.Interfaces.TextRangeData

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

PowerPoint.Interfaces.TextRangeUpdateData

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

列挙型

PowerPoint.ErrorCodes
PowerPoint.InsertSlideFormatting

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

関数

PowerPoint.createPresentation(base64File)

新しいプレゼンテーションを作成して開きます。 必要に応じて、Base64 でエンコードされた .pptx ファイルをプレゼンテーションにあらかじめ設定することができます。

API セット: 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 セット: PowerPointApi 1.1

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

パラメーター

base64File

string

省略可能。 Base64 でエンコードされた .pptx ファイル。 既定値は null です。 文字列の長さは最大 71,680,000 文字です。

返品

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 が必要です。

返品

例

// *.run methods automatically create an OfficeExtension.ClientRequestContext
// object to work with the Office file.
await PowerPoint.run(async (context) => {
  const presentation = context.presentation;
  // Interact with the PowerPoint presentation...
});

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 が必要です。

返品