次の方法で共有


PowerPoint.BulletFormat class

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

Extends

注釈

[ API セット: PowerPointApi 1.4 ]

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/text/get-set-textrange.yaml

// Gets navigational (complex) properties of the selected text range.
await PowerPoint.run(async (context) => {
  const textRange: PowerPoint.TextRange = context.presentation.getSelectedTextRange();
  textRange.load("font,paragraphFormat/bulletFormat,paragraphFormat/horizontalAlignment");
  await context.sync();

  console.log("Font properties of selected text range:");
  console.log(`\tallCaps: ${textRange.font.allCaps}`);
  console.log(`\tbold: ${textRange.font.bold}`);
  console.log(`\tcolor: ${textRange.font.color}`);
  console.log(`\tdoubleStrikethrough: ${textRange.font.doubleStrikethrough}`);
  console.log(`\titalic: ${textRange.font.italic}`);
  console.log(`\tname: ${textRange.font.name}`);
  console.log(`\tsize: ${textRange.font.size}`);
  console.log(`\tsmallCaps: ${textRange.font.smallCaps}`);
  console.log(`\tstrikethrough: ${textRange.font.strikethrough}`);
  console.log(`\tsubscript: ${textRange.font.subscript}`);
  console.log(`\tsuperscript: ${textRange.font.superscript}`);
  console.log(`\tunderline: ${textRange.font.underline}`);

  console.log("Paragraph format properties of selected text range:");
  console.log(`\tbulletFormat.visible: ${textRange.paragraphFormat.bulletFormat.visible}`);
  console.log(`\thorizontalAlignment: ${textRange.paragraphFormat.horizontalAlignment}`);
});

プロパティ

context

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

visible

段落の箇条書きを表示するかどうかを指定します。 PowerPoint.TextRange に箇条書きの表示値が異なるテキスト フラグメントが含まれている場合は、nullを返します。

メソッド

load(options)

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

load(propertyNames)

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

load(propertyNamesAndPaths)

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

toJSON()

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

プロパティの詳細

context

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

context: RequestContext;

プロパティ値

visible

段落の箇条書きを表示するかどうかを指定します。 PowerPoint.TextRange に箇条書きの表示値が異なるテキスト フラグメントが含まれている場合は、nullを返します。

visible: boolean | null;

プロパティ値

boolean | null

注釈

[ API セット: PowerPointApi 1.4 ]

メソッドの詳細

load(options)

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

load(options?: PowerPoint.Interfaces.BulletFormatLoadOptions): PowerPoint.BulletFormat;

パラメーター

options
PowerPoint.Interfaces.BulletFormatLoadOptions

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

戻り値

load(propertyNames)

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

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

パラメーター

propertyNames

string | string[]

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

戻り値

load(propertyNamesAndPaths)

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

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

パラメーター

propertyNamesAndPaths

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

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

戻り値

toJSON()

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

toJSON(): PowerPoint.Interfaces.BulletFormatData;

戻り値