次の方法で共有


PowerPoint.ParagraphHorizontalAlignment enum

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

注釈

[ API セット: PowerPointApi 1.4 ]

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/powerpoint/shapes/add-modify-tables.yaml

// Specifies the horizontal and vertical alignments of the cells in a table.
await PowerPoint.run(async (context) => {
  const shapes = context.presentation.getSelectedSlides().getItemAt(0).shapes;

  // Add a table, specifying horizontal and vertical alignment.
  shapes.addTable(3, 4, {
    values: [
      ["A", "BB", "CCC", "DDDD"],
      ["E", "FF", "GGG", "HHHH"],
      ["1", "12", "123", "1234"]
    ],
    uniformCellProperties: {
      horizontalAlignment: PowerPoint.ParagraphHorizontalAlignment.justify,
      verticalAlignment: PowerPoint.TextVerticalAlignment.middle
    }
  });
  await context.sync();
});

フィールド

center = "Center"

中央にテキストを配置します。

distributed = "Distributed"

テキスト単語をテキスト行全体に分散します。

justify = "Justify"

行全体でテキストが正当化されるようにテキストを揃えます。

justifyLow = "JustifyLow"

アラビア語テキストの Kashida の長さの調整または配置を指定します。

left = "Left"

テキストを左余白に揃えます。

right = "Right"

テキストを右余白に揃えます。

thaiDistributed = "ThaiDistributed"

各文字は単語として扱われるため、タイ語のテキストを特別に配布します。