次の方法で共有


powerpoint package

クラス

PowerPoint.Application

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

PowerPoint.Presentation

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

PowerPoint.RequestContext

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

PowerPoint.Shape

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

PowerPoint.ShapeCollection

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

PowerPoint.Slide

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

PowerPoint.SlideCollection

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

PowerPoint.SlideLayout

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

PowerPoint.SlideLayoutCollection

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

PowerPoint.SlideMaster

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

PowerPoint.SlideMasterCollection

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

PowerPoint.Tag

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

PowerPoint.TagCollection

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

インターフェイス

PowerPoint.AddSlideOptions

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

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.ShapeCollectionLoadOptions

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

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.ShapeLoadOptions

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

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.SlideLayoutCollectionLoadOptions

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

PowerPoint.Interfaces.SlideLayoutCollectionUpdateData

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

PowerPoint.Interfaces.SlideLayoutData

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

PowerPoint.Interfaces.SlideLayoutLoadOptions

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

PowerPoint.Interfaces.SlideLoadOptions

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

PowerPoint.Interfaces.SlideMasterBackgroundData

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

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.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.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.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 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 です。 文字列の最大長は 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 が必要です。

戻り値