Новые возможности API JavaScript для Word 1.2

В WordApi 1.2 добавлена поддержка встроенных изображений.

Список API

В следующей таблице перечислены API в наборе обязательных 1.2 API JavaScript для Word. Справочную документацию по API для всех API, поддерживаемых набором обязательных api JavaScript для Word 1.2 или более ранней версии, см. в статье Api Word в наборе требований 1.2 или более ранней версии.

Класс Поля Описание
Основной текст insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.start | Word.InsertLocation.end | "Пуск" | "End") Вставляет рисунок в содержимое в заданном расположении.
ContentControl insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.start | Word.InsertLocation.end | "Заменить" | "Пуск" | "End") Вставляет встроенный рисунок в элемент управления содержимым в указанном расположении.
InlinePicture delete() Удаляет встроенный рисунок из документа.
insertBreak(breakType: Word.BreakType | | "Страница" "Далее" | "SectionNext" | "SectionContinuous" | | SectionEven | SectionOdd "Line", insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | | "Before" "После") Вставляет разрыв в указанном расположении в основном документе.
insertFileFromBase64(base64File: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | | "Before" "После") Вставляет документ в указанном расположении.
insertHtml(html: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | | "Before" "После") Вставляет HTML-код в указанном расположении.
insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation.replace | Word.InsertLocation.before | Word.InsertLocation.after | "Заменить" | | "Before" "После") Вставляет встроенный рисунок в указанном расположении.
insertOoxml(ooxml: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | | "Before" "После") Вставляет OOXML-код в указанном расположении.
insertParagraph(paragraphText: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | | "Before" "После") Вставляет абзац в указанном расположении.
insertText(text: string, insertLocation: Word.InsertLocation.before | Word.InsertLocation.after | | "Before" "После") Вставляет текст в заданном расположении.
paragraph Возвращает родительский абзац, который содержит встроенный рисунок.
select(selectionMode?: Word.SelectionMode) Выбирает встроенный рисунок.
Range inlinePictures Возвращает коллекцию объектов встроенных рисунков в диапазоне.
insertInlinePictureFromBase64(base64EncodedImage: string, insertLocation: Word.InsertLocation | "Заменить" | "Пуск" | "End" | | "Before" "После") Вставляет рисунок в указанном расположении.

См. также