編輯

共用方式為


What's new in Word JavaScript API 1.2

WordApi 1.2 added support for inline pictures.

API list

The following table lists the APIs in Word JavaScript API requirement set 1.2. To view API reference documentation for all APIs supported by Word JavaScript API requirement set 1.2 or earlier, see Word APIs in requirement set 1.2 or earlier.

Class Fields Description
Body insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Start" | "End") Inserts a picture into the body at the specified location.
ContentControl insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Replace" | "Start" | "End") Inserts an inline picture into the content control at the specified location.
InlinePicture delete() Deletes the inline picture from the document.
insertBreak(breakType: Word.BreakType | "Page" | "Next" | "SectionNext" | "SectionContinuous" | "SectionEven" | "SectionOdd" | "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After") Inserts a break at the specified location in the main document.
insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After") Inserts a document at the specified location.
insertHtml(html: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After") Inserts HTML at the specified location.
insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.before | Word.InsertLocation.after | "Replace" | "Before" | "After") Inserts an inline picture at the specified location.
insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After") Inserts OOXML at the specified location.
insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After") Inserts a paragraph at the specified location.
insertText(text: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | "Before" | "After") Inserts text at the specified location.
paragraph Gets the parent paragraph that contains the inline image.
select(selectionMode?: Word.SelectionMode) Selects the inline picture.
Range inlinePictures Gets the collection of inline picture objects in the range.
insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation | "Replace" | "Start" | "End" | "Before" | "After") Inserts a picture at the specified location.

See also