Word JavaScript API 1.1 の新機能

WordApi 1.1 は、Word JavaScript API の最初の要件セットです。 これは、Word 2016でサポートされている唯一のWord API 要件セットです。

API リスト

次の表は、Word JavaScript API 要件セット 1.1 の API の一覧です。 Word JavaScript API 要件セット 1.1 でサポートされているすべての API の API リファレンス ドキュメントを表示するには、「要件セット 1.1 の API Word」を参照してください。

クラス フィールド 説明
Body clear() 本文オブジェクトの内容を消去します。
contentControls 本文のリッチ テキスト コンテンツ コントロール オブジェクトのコレクションを取得します。
font 本文のテキスト形式を取得します。
getHtml() body オブジェクトの HTML 表現を取得します。
getOoxml() 本文オブジェクトの OOXML (Office オープン XML) 表記を取得します。
inlinePictures 本文内の InlinePicture オブジェクトのコレクションを取得します。
insertBreak(breakType: Word。BreakType |"Page" |"次へ" |"SectionNext" |"SectionContinuous" |"SectionEven" |"SectionOdd" |"Line"、insertLocation: Word。InsertLocation.start |Word。InsertLocation.end |"Start" |"End") メイン文書の指定した位置に、区切りを挿入します。
insertContentControl() Body オブジェクトをリッチ テキスト コンテンツ コントロールでラップします。
insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace |Word。InsertLocation.start |Word。InsertLocation.end |"Replace" |"Start" |"End") 文書を本文の指定された位置に挿入します。
insertHtml(html: string, insertLocation: Word.InsertLocation.replace |Word。InsertLocation.start |Word。InsertLocation.end |"Replace" |"Start" |"End") 指定した位置に HTML を挿入します。
insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace |Word。InsertLocation.start |Word。InsertLocation.end |"Replace" |"Start" |"End") 指定した位置に OOXML を挿入します。
insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start |Word。InsertLocation.end |"Start" |"End") 指定した位置に、段落を挿入します。
insertText(text: string, insertLocation: Word.InsertLocation.replace |Word。InsertLocation.start |Word。InsertLocation.end |"Replace" |"Start" |"End") テキストを本文の指定された位置に挿入します。
paragraphs 本文内の段落オブジェクトのコレクションを取得します。
parentContentControl 本文を含むコンテンツ コントロールを取得します。
search(searchText: string, searchOptions?: Word。SearchOptions |{ ignorePunct?: boolean ignoreSpace?: boolean matchCase?: boolean matchPrefix?: boolean matchSuffix?: boolean matchWholeWord?: boolean matchWildcards?: boolean }) body オブジェクトのスコープで、指定した SearchOptions を使用して検索を実行します。
select(selectionMode?: Word。SelectionMode) 本文を選択し、その本文に Word の UI を移動します。
style 本文のスタイル名を指定します。
text 本文のテキストを取得します。
ContentControl 外観 コンテンツ コントロールの外観を指定します。
cannotDelete ユーザーがコンテンツ コントロールを削除できるかどうかを示す値を指定します。
cannotEdit ユーザーがコンテンツ コントロールの内容を編集できるかどうかを示す値を指定します。
clear() コンテンツ コントロールの内容をクリアします。
color コンテンツ コントロールの色を指定します。
contentControls コンテンツ コントロールのコンテンツ コントロール オブジェクトのコレクションを取得します。
delete(keepContent: boolean) コンテンツ コントロールとそのコンテンツを削除します。
font コンテンツ コントロールのテキストの書式設定を取得します。
getHtml() コンテンツ コントロール オブジェクトの HTML 表現を取得します。
getOoxml() コンテンツ コントロール オブジェクトの Office Open XML (OOXML) 表記を取得します。
id コンテンツ コントロールの識別子を表す整数値を取得します。
inlinePictures コンテンツ コントロール内の InlinePicture オブジェクトのコレクションを取得します。
insertBreak(breakType: Word。BreakType |"Page" |"次へ" |"SectionNext" |"SectionContinuous" |"SectionEven" |"SectionOdd" |"Line"、insertLocation: Word。InsertLocation.start |Word。InsertLocation.end |Word。InsertLocation.before |Word。InsertLocation.after |"Start" |"End" |"Before" |"After") メイン文書の指定した位置に、区切りを挿入します。
insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace |Word。InsertLocation.start |Word。InsertLocation.end |"Replace" |"Start" |"End") 指定した場所にあるコンテンツ コントロールにドキュメントを挿入します。
insertHtml(html: string, insertLocation: Word.InsertLocation.replace |Word。InsertLocation.start |Word。InsertLocation.end |"Replace" |"Start" |"End") コンテンツ コントロール内の指定された位置に HTML を挿入します。
insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace |Word。InsertLocation.start |Word。InsertLocation.end |"Replace" |"Start" |"End") 指定した場所にあるコンテンツ コントロールに OOXML を挿入します。
insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.start |Word。InsertLocation.end |Word。InsertLocation.before |Word。InsertLocation.after |"Start" |"End" |"Before" |"After") 指定した位置に、段落を挿入します。
insertText(text: string, insertLocation: Word.InsertLocation.replace |Word。InsertLocation.start |Word。InsertLocation.end |"Replace" |"Start" |"End") コンテンツ コントロール内の指定された位置にテキストを挿入します。
paragraphs コンテンツ コントロール内の段落オブジェクトのコレクションを取得します。
parentContentControl コンテンツ コントロールを含むコンテンツ コントロールを取得します。
placeholderText コンテンツ コントロールのプレースホルダー テキストを指定します。
removeWhenEdited コンテンツ コントロールが編集後に削除されるかどうかを示す値を指定します。
search(searchText: string, searchOptions?: Word。SearchOptions |{ ignorePunct?: boolean ignoreSpace?: boolean matchCase?: boolean matchPrefix?: boolean matchSuffix?: boolean matchWholeWord?: boolean matchWildcards?: boolean }) コンテンツ コントロール オブジェクトのスコープで、指定した SearchOptions を使用して検索を実行します。
select(selectionMode?: Word。SelectionMode) コンテンツ コントロールを選択します。
style コンテンツ コントロールのスタイル名を指定します。
タグ コンテンツ コントロールを識別するタグを指定します。
text コンテンツ コントロールのテキストを取得します。
title コンテンツ コントロールのタイトルを指定します。
type コンテンツ コントロールの種類を取得します。
ContentControlCollection getById(id: number) コンテンツ コントロールの識別子によってコンテンツ コントロールを取得します。
getByTag(tag: string) 指定されたタグを含むコンテンツ コントロールを取得します。
getByTitle(title: string) 指定されたタイトルを含むコンテンツ コントロールを取得します。
getItem(id: number) ID でコンテンツ コントロールを取得します。
items このコレクション内に読み込まれた子アイテムを取得します。
ドキュメント body メイン ドキュメントの body オブジェクトを取得します。
contentControls ドキュメント内のコンテンツ コントロール オブジェクトのコレクションを取得します。
getSelection() ドキュメントの現在の選択範囲を取得します。
save() ドキュメントを保存します。
保存 ドキュメント内の変更が保存されているかどうかを示します。
sections ドキュメント内のセクション オブジェクトのコレクションを取得します。
フォント bold フォントが太字かどうかを示す値を指定します。
color 指定したフォントの色を指定します。
doubleStrikeThrough フォントにダブル取り消し線があるかどうかを示す値を指定します。
highlightColor 強調表示の色を指定します。
italic フォントが斜体かどうかを示す値を指定します。
name フォントの名前を表す値を指定します。
size フォント サイズをポイント単位で表す値を指定します。
取り消し 線 フォントに取り消し線があるかどうかを示す値を指定します。
subscript フォントが添字であるかどうかを示す値を指定します。
superscript フォントが上付き文字であるかどうかを示す値を指定します。
underline フォントの下線の種類を示す値を指定します。
InlinePicture altTextDescription インライン イメージに関連付けられている代替テキストを表す文字列を指定します。
altTextTitle インライン イメージのタイトルを含む文字列を指定します。
getBase64ImageSrc() インライン イメージの Base64 でエンコードされた文字列表現を取得します。
height インライン イメージの高さを表す数値を指定します。
hyperlink イメージ上のハイパーリンクを指定します。
insertContentControl() リッチ テキストのコンテンツ コントロールでインライン画像をラップします。
lockAspectRatio インライン イメージのサイズを変更するときに元の比率を保持するかどうかを示す値を指定します。
parentContentControl インライン画像を含むコンテンツ コントロールを取得します。
width インライン イメージの幅を表す数値を指定します。
InlinePictureCollection items このコレクション内に読み込まれた子アイテムを取得します。
Paragraph 配置 段落の配置を指定します。
clear() 段落オブジェクトの内容をクリアします。
contentControls 段落内のコンテンツ コントロール オブジェクトのコレクションを取得します。
delete() 文書から段落と、その段落の内容を削除します。
firstLineIndent 最初の行またはぶら下げインデントの値をポイント単位で指定します。
font 段落のテキスト形式を取得します。
getHtml() 段落オブジェクトの HTML 表現を取得します。
getOoxml() Paragraph オブジェクトの Office Open XML (OOXML) 表記を取得します。
inlinePictures 段落内の InlinePicture オブジェクトのコレクションを取得します。
insertBreak(breakType: Word。BreakType |"Page" |"次へ" |"SectionNext" |"SectionContinuous" |"SectionEven" |"SectionOdd" |"Line"、insertLocation: Word。InsertLocation.before |Word。InsertLocation.after |"Before" |"After") メイン文書の指定した位置に、区切りを挿入します。
insertContentControl() Paragraph オブジェクトをリッチ テキスト コンテンツ コントロールでラップします。
insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.replace |Word。InsertLocation.start |Word。InsertLocation.end |"Replace" |"Start" |"End") 指定した場所の段落にドキュメントを挿入します。
insertHtml(html: string, insertLocation: Word.InsertLocation.replace |Word。InsertLocation.start |Word。InsertLocation.end |"Replace" |"Start" |"End") 段落の指定した位置に、HTML を挿入します。
insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace |Word。InsertLocation.start |Word。InsertLocation.end |"Replace" |"Start" |"End") 段落の指定した位置に、図を挿入します。
insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.replace |Word。InsertLocation.start |Word。InsertLocation.end |"Replace" |"Start" |"End") 指定した場所の段落に OOXML を挿入します。
insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before |Word。InsertLocation.after |"Before" |"After") 指定した位置に、段落を挿入します。
insertText(text: string, insertLocation: Word.InsertLocation.replace |Word。InsertLocation.start |Word。InsertLocation.end |"Replace" |"Start" |"End") 段落の指定した位置に、テキストを挿入します。
leftIndent 段落の左インデント値をポイント単位で指定します。
lineSpacing 指定した段落の行間をポイント単位で指定します。
lineUnitAfter 段落の後のグリッド線の間隔を指定します。
lineUnitBefore 段落の前のグリッド線の間隔を指定します。
outlineLevel 段落のアウトライン レベルを指定します。
parentContentControl 段落を格納しているコンテンツ コントロールを取得します。
rightIndent 段落の右インデント値をポイント単位で指定します。
search(searchText: string, searchOptions?: Word。SearchOptions |{ ignorePunct?: boolean ignoreSpace?: boolean matchCase?: boolean matchPrefix?: boolean matchSuffix?: boolean matchWholeWord?: boolean matchWildcards?: boolean }) 指定した SearchOptions を使用して、段落オブジェクトのスコープで検索を実行します。
select(selectionMode?: Word。SelectionMode) 段落を選択して、その段落に Word の UI を移動します。
spaceAfter 段落の後の間隔をポイント単位で指定します。
spaceBefore 段落の前の間隔をポイント単位で指定します。
style 段落のスタイル名を指定します。
text 段落のテキストを取得します。
ParagraphCollection items このコレクション内に読み込まれた子アイテムを取得します。
Range clear() 範囲オブジェクトの内容をクリアします。
contentControls 範囲内のコンテンツ コントロール オブジェクトのコレクションを取得します。
delete() 文書から範囲と、その範囲の内容を削除します。
font 範囲のテキスト形式を取得します。
getHtml() 範囲オブジェクトの HTML 表現を取得します。
getOoxml() Range オブジェクトの OOXML 表記を取得します。
insertBreak(breakType: Word。BreakType |"Page" |"次へ" |"SectionNext" |"SectionContinuous" |"SectionEven" |"SectionOdd" |"Line"、insertLocation: Word。InsertLocation.before |Word。InsertLocation.after |"Before" |"After") メイン文書の指定した位置に、区切りを挿入します。
insertContentControl() Range オブジェクトをリッチ テキスト コンテンツ コントロールでラップします。
insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation |"Replace" |"Start" |"End" |"Before" |"After") 指定した位置に文書を挿入します。
insertHtml(html: string, insertLocation: Word.InsertLocation |"Replace" |"Start" |"End" |"Before" |"After") 指定した位置に HTML を挿入します。
insertOoxml(ooxml: string, insertLocation: Word.InsertLocation |"Replace" |"Start" |"End" |"Before" |"After") 指定した位置に OOXML を挿入します。
insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before |Word。InsertLocation.after |"Before" |"After") 指定した位置に、段落を挿入します。
insertText(text: string, insertLocation: Word.InsertLocation |"Replace" |"Start" |"End" |"Before" |"After") 指定した位置にテキストを挿入します。
paragraphs 範囲内の段落オブジェクトのコレクションを取得します。
parentContentControl 範囲を格納するコンテンツ コントロールを取得します。
search(searchText: string, searchOptions?: Word。SearchOptions |{ ignorePunct?: boolean ignoreSpace?: boolean matchCase?: boolean matchPrefix?: boolean matchSuffix?: boolean matchWholeWord?: boolean matchWildcards?: boolean }) 範囲オブジェクトのスコープで、指定した SearchOptions を使用して検索を実行します。
select(selectionMode?: Word。SelectionMode) 範囲を選択して、その範囲に Word の UI を移動します。
style 範囲のスタイル名を指定します。
text 範囲のテキストを取得します。
RangeCollection items このコレクション内に読み込まれた子アイテムを取得します。
SearchOptions ignorePunct 単語間のすべての句読点文字を無視するかどうかを示す値を指定します。
ignoreSpace 単語間のすべての空白を無視するかどうかを示す値を指定します。
matchCase 大文字と小文字を区別する検索を実行するかどうかを示す値を指定します。
matchPrefix 検索文字列で始まる単語と一致するかどうかを示す値を指定します。
matchSuffix 検索文字列で終わる単語と一致するかどうかを示す値を指定します。
matchWholeWord 大きな単語の一部であるテキストではなく、単語全体のみを検索するかどうかを示す値を指定します。
matchWildcards 特殊な検索演算子を使用して検索を実行するかどうかを示す値を指定します。
Section body セクションの body オブジェクトを取得します。
getFooter(type: Word。HeaderFooterType) セクションのフッターの 1 つを取得します。
getHeader(type: Word。HeaderFooterType) セクションのヘッダーの 1 つを取得します。
SectionCollection items このコレクション内に読み込まれた子アイテムを取得します。

関連項目