次の方法で共有


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() Body オブジェクトの内容をクリアします。
contentControls 本文のリッチ テキスト コンテンツ コントロール オブジェクトのコレクションを取得します。
font 本文のテキスト形式を取得します。
getHtml() Body オブジェクトの HTML 表現を取得します。
getOoxml() Body オブジェクトの OOXML (Office Open XML) 表現を取得します。
inlinePictures 本文内の InlinePicture オブジェクトのコレクションを取得します。
insertBreak(breakType: Word。BreakType |"Page" |"次へ" |"SectionNext" |"SectionContinuous" |"SectionEven" |"SectionOdd" |"Line"、insertLocation: Word。InsertLocation.start |Word。InsertLocation.end |"Start" |"End") メイン文書の指定した位置に、区切りを挿入します。
insertContentControl(contentControlType?: Word。ContentControlType.richText |Word。ContentControlType.plainText |Word。ContentControlType.checkBox |Word。ContentControlType.dropDownList |Word。ContentControlType.comboBox |Word。ContentControlType.buildingBlockGallery |Word。ContentControlType.datePicker |Word。ContentControlType.repeatingSection |Word。ContentControlType.picture |Word。ContentControlType.group |"RichText" |"PlainText" |"CheckBox" |"DropDownList" |"ComboBox" |"BuildingBlockGallery" |"DatePicker" |"RepeatingSection" |"Picture" |"Group") 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 本文内の Paragraph オブジェクトのコレクションを取得します。
parentContentControl 本文を含むコンテンツ コントロールを取得します。
search(searchText: string, searchOptions?: Word。SearchOptions |{ ignorePunct?: boolean ignoreSpace?: boolean matchCase?: boolean matchPrefix?: boolean matchSuffix?: boolean matchWholeWord?: boolean matchWildcards?: boolean }) Body オブジェクトのスコープで、指定した検索オプションを使用して検索を実行します。
select(selectionMode?: Word。SelectionMode) 本文を選択し、その本文に Word の UI を移動します。
style 本文のスタイル名を指定します。
text 本文のテキストを取得します。
ContentControl 様子 コンテンツ コントロールの外観を指定します。
cannotDelete ユーザーがコンテンツ コントロールを削除できるかどうかを示す値を指定します。
cannotEdit ユーザーがコンテンツ コントロールの内容を編集できるかどうかを示す値を指定します。
clear() コンテンツ コントロールの内容をクリアします。
color コンテンツ コントロールの色を指定します。
contentControls コンテンツ コントロール内の ContentControl オブジェクトのコレクションを取得します。
delete(keepContent: boolean) コンテンツ コントロールとそのコンテンツを削除します。
font コンテンツ コントロールのテキストの書式設定を取得します。
getHtml() ContentControl オブジェクトの HTML 表現を取得します。
getOoxml() ContentControl オブジェクトの 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 コンテンツ コントロール内の Paragraph オブジェクトのコレクションを取得します。
parentContentControl コンテンツ コントロールを含むコンテンツ コントロールを取得します。
placeholderText コンテンツ コントロールのプレースホルダー テキストを指定します。
removeWhenEdited コンテンツ コントロールが編集後に削除されるかどうかを示す値を指定します。
search(searchText: string, searchOptions?: Word。SearchOptions |{ ignorePunct?: boolean ignoreSpace?: boolean matchCase?: boolean matchPrefix?: boolean matchSuffix?: boolean matchWholeWord?: boolean matchWildcards?: boolean }) ContentControl オブジェクトのスコープで、指定した検索オプションを使用して検索を実行します。
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 ドキュメント内の ContentControl オブジェクトのコレクションを取得します。
getSelection() ドキュメントの現在の選択範囲を取得します。
save(saveBehavior?: Word。SaveBehavior,fileName?: string) ドキュメントを保存します。
保存 ドキュメント内の変更が保存されているかどうかを示します。
sections ドキュメント内の Section オブジェクトのコレクションを取得します。
フォント bold フォントが太字かどうかを指定します。
color フォントの色を指定します。
doubleStrikeThrough フォントにダブル取り消し線があるかどうかを指定します。
highlightColor 強調表示の色を指定します。
italic フォントを斜体にするかどうかを指定します。
name フォントの名前を指定します。
size フォント サイズをポイント単位で指定します。
strikeThrough フォントに取り消し線があるかどうかを指定します。
subscript フォントが添字であるかどうかを指定します。
superscript フォントが上付き文字かどうかを指定します。
underline フォントの下線の種類を指定します。
InlinePicture altTextDescription インライン イメージに関連付けられている代替テキストを表す文字列を指定します。
altTextTitle インライン イメージのタイトルを含む文字列を指定します。
getBase64ImageSrc() インライン イメージの Base64 でエンコードされた文字列表現を取得します。
height インライン イメージの高さを表す数値を指定します。
hyperlink イメージ上のハイパーリンクを指定します。
insertContentControl() リッチ テキストのコンテンツ コントロールでインライン画像をラップします。
lockAspectRatio インライン イメージのサイズを変更するときに元の比率を保持するかどうかを示す値を指定します。
parentContentControl インライン画像を含むコンテンツ コントロールを取得します。
width インライン イメージの幅を表す数値を指定します。
InlinePictureCollection items このコレクション内に読み込まれた子アイテムを取得します。
Paragraph アラインメント 段落の配置を指定します。
clear() Paragraph オブジェクトの内容をクリアします。
contentControls 段落内の ContentControl オブジェクトのコレクションを取得します。
delete() 文書から段落と、その段落の内容を削除します。
firstLineIndent 最初の行またはぶら下げインデントの値をポイント単位で指定します。
font 段落のテキスト形式を取得します。
getHtml() Paragraph オブジェクトの 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(contentControlType?: Word。ContentControlType.richText |Word。ContentControlType.plainText |Word。ContentControlType.checkBox |Word。ContentControlType.dropDownList |Word。ContentControlType.comboBox |Word。ContentControlType.buildingBlockGallery |Word。ContentControlType.datePicker |Word。ContentControlType.repeatingSection |Word。ContentControlType.picture |Word。ContentControlType.group |"RichText" |"PlainText" |"CheckBox" |"DropDownList" |"ComboBox" |"BuildingBlockGallery" |"DatePicker" |"RepeatingSection" |"Picture" |"Group") 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 }) Paragraph オブジェクトのスコープで、指定した検索オプションを使用して検索を実行します。
select(selectionMode?: Word。SelectionMode) 段落を選択して、その段落に Word の UI を移動します。
spaceAfter 段落の後の間隔をポイント単位で指定します。
spaceBefore 段落の前の間隔をポイント単位で指定します。
style 段落のスタイル名を指定します。
text 段落のテキストを取得します。
ParagraphCollection items このコレクション内に読み込まれた子アイテムを取得します。
Range clear() Range オブジェクトの内容をクリアします。
contentControls 範囲内の ContentControl オブジェクトのコレクションを取得します。
delete() 文書から範囲と、その範囲の内容を削除します。
font 範囲のテキスト形式を取得します。
getHtml() Range オブジェクトの HTML 表現を取得します。
getOoxml() Range オブジェクトの OOXML 表現を取得します。
insertBreak(breakType: Word。BreakType |"Page" |"次へ" |"SectionNext" |"SectionContinuous" |"SectionEven" |"SectionOdd" |"Line"、insertLocation: Word。InsertLocation.before |Word。InsertLocation.after |"Before" |"After") メイン文書の指定した位置に、区切りを挿入します。
insertContentControl(contentControlType?: Word。ContentControlType.richText |Word。ContentControlType.plainText |Word。ContentControlType.checkBox |Word。ContentControlType.dropDownList |Word。ContentControlType.comboBox |Word。ContentControlType.buildingBlockGallery |Word。ContentControlType.datePicker |Word。ContentControlType.repeatingSection |Word。ContentControlType.picture |Word。ContentControlType.group |"RichText" |"PlainText" |"CheckBox" |"DropDownList" |"ComboBox" |"BuildingBlockGallery" |"DatePicker" |"RepeatingSection" |"Picture" |"Group") 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 範囲内の Paragraph オブジェクトのコレクションを取得します。
parentContentControl 範囲を含む現在サポートされているコンテンツ コントロールを取得します。
search(searchText: string, searchOptions?: Word。SearchOptions |{ ignorePunct?: boolean ignoreSpace?: boolean matchCase?: boolean matchPrefix?: boolean matchSuffix?: boolean matchWholeWord?: boolean matchWildcards?: boolean }) Range オブジェクトのスコープで、指定した検索オプションを使用して検索を実行します。
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 このコレクション内に読み込まれた子アイテムを取得します。

関連項目