Word.BorderLineStyle enum

オブジェクトの 罫線 スタイルを指定します。

注釈

API セット: WordApiDesktop 1.3

使用元

// Link to full sample: https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/word/25-paragraph/add-border-to-paragraph.yaml

if (!Office.context.requirements.isSetSupported("WordApiDesktop", "1.3")) {
  console.error("This sample requires WordApiDesktop 1.3 or later.");
  return;
}

await Word.run(async (context) => {
  // Insert a paragraph at the beginning of the document.
  const paragraph: Word.Paragraph =
    context.document.body.insertParagraph(
      "Note: Added a border to this paragraph.",
      Word.InsertLocation.start
    );

  // Load the paragraph borders so they can be formatted.
  const borders: Word.BorderUniversalCollection = paragraph.borders;
  borders.load("items");
  await context.sync();

  // Apply a visible double blue line to every side of the paragraph.
  borders.items.forEach((border: Word.BorderUniversal) => {
    border.isVisible = true;
    border.color = "#4472C4";
    border.lineStyle = Word.BorderLineStyle.double;
    border.lineWidth = Word.LineWidth.pt150;
  });

  await context.sync();

  console.log(
    `Applied the ${Word.BorderLineStyle.double} line style to ${borders.items.length} paragraph borders.`
  );
});

フィールド

dashDot = "DashDot"

破線のスタイル。

dashDotDot = "DashDotDot"

破線/点-点線スタイル。

dashDotStroked = "DashDotStroked"

破線の線のスタイル。

dashLargeGap = "DashLargeGap"

隙間が大きい破線スタイル。

dashSmallGap = "DashSmallGap"

小さな隙間のある破線スタイル。

dot = "Dot"

点線のスタイル。

double = "Double"

二重線のスタイル。

doubleWavy = "DoubleWavy"

二重波線スタイル。

emboss3D = "Emboss3D"

浮き出し3D線スタイル。

engrave3D = "Engrave3D"

3D 線のスタイルが刻印されています。

inset = "Inset"

はめ込み線のスタイル。

none = "None"

線スタイルなし。

outset = "Outset"

アウトセット線のスタイル。

single = "Single"

単線スタイル。

singleWavy = "SingleWavy"

単一の波線スタイル。

thickThinLargeGap = "ThickThinLargeGap"

隙間が大きい太細線スタイル。

thickThinMedGap = "ThickThinMedGap"

中程度の隙間の太細線スタイル。

thickThinSmallGap = "ThickThinSmallGap"

隙間の小さい太細線スタイル。

thinThickLargeGap = "ThinThickLargeGap"

隙間が大きい細い太い線スタイル。

thinThickMedGap = "ThinThickMedGap"

中程度の隙間の細い太いラインスタイル。

thinThickSmallGap = "ThinThickSmallGap"

隙間の小さい細い太いラインスタイル。

thinThickThinLargeGap = "ThinThickThinLargeGap"

隙間の大きい細い太い細いラインスタイル。

thinThickThinMedGap = "ThinThickThinMedGap"

中程度の隙間の細い太い細いラインスタイル。

thinThickThinSmallGap = "ThinThickThinSmallGap"

隙間が小さい細い太い細い線スタイル。

triple = "Triple"

トリプル ライン スタイル。